summaryrefslogtreecommitdiffstats
path: root/demux/demux_raw.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2020-02-05 20:47:10 -0600
committerDudemanguy <random342@airmail.cc>2020-02-06 16:17:25 +0000
commit2aaf5317200da0b836b1772576a0d8654e5313a7 (patch)
tree7967afaa6279a12ed584843ba28f060c8672477f /demux/demux_raw.c
parent7c5c05771796468f96c97e03a692b0dbeb484e02 (diff)
downloadmpv-2aaf5317200da0b836b1772576a0d8654e5313a7.tar.bz2
mpv-2aaf5317200da0b836b1772576a0d8654e5313a7.tar.xz
wayland: toplevel config fixes
There were a couple of erroneous things in the handle_toplevel_config function. Firstly, looping through the different states was not handled correctly. Launching a window as maximized (can happen in sway for example) was always stuck on true and would never be set to false. Fix this by always checking if XDG_TOPLEVEL_STATE_MAXIMIZED is found or not. Also do a similar thing for the fullscreen state. Additionally, there were some issues with resizing windows and window-scale going back to old sizes. The root of this problem is that the width and height arguments of handle_toplevel_config aren't actually guarenteed to be the actual width and height of the surface. There are times when mpv will set the surface size on its own (like with window-scale) which will be unknown to the toplevel listener. To complicate matters, there are times when we do want to use the width and height arguments (like when resizing with the mouse). Fix this by checking if the width and height arguments reported by handle_toplevel_config changed from the previous call of the function. If the value is different, then we go ahead and use them when setting mpv's geometry. If not, then we just ignore it.
Diffstat (limited to 'demux/demux_raw.c')
0 files changed, 0 insertions, 0 deletions