mirror of https://github.com/mpv-player/mpv
2aaf531720
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. |
||
---|---|---|
.. | ||
decode | ||
filter | ||
out | ||
csputils.c | ||
csputils.h | ||
cuda.c | ||
d3d.c | ||
d3d.h | ||
fmt-conversion.c | ||
fmt-conversion.h | ||
hwdec.c | ||
hwdec.h | ||
image_loader.c | ||
image_loader.h | ||
image_writer.c | ||
image_writer.h | ||
img_format.c | ||
img_format.h | ||
mp_image.c | ||
mp_image.h | ||
mp_image_pool.c | ||
mp_image_pool.h | ||
sws_utils.c | ||
sws_utils.h | ||
vaapi.c | ||
vaapi.h | ||
vdpau.c | ||
vdpau.h | ||
vdpau_functions.inc | ||
vdpau_mixer.c | ||
vdpau_mixer.h | ||
zimg.c | ||
zimg.h |