summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-01-25 11:48:43 -0600
committerDudemanguy <random342@airmail.cc>2022-01-27 15:15:43 +0000
commit5bcf0617448362e12a813c6c8f5192a8c9c05cc2 (patch)
tree44709368f9751da59ceb0c7e0e46dae6de988561
parent8087e3371f8ffbdc8ddcbc0445392b0480ef02a4 (diff)
downloadmpv-5bcf0617448362e12a813c6c8f5192a8c9c05cc2.tar.bz2
mpv-5bcf0617448362e12a813c6c8f5192a8c9c05cc2.tar.xz
Revert "wayland: ignore 0x0 resizes"
So actually according to the xdg-shell spec, a 0x0 resize is meant to indicate that "the client should decide its own window dimension". Previously, this just accidentally worked. In mutter 41.3, they changed how 0x0 resizes were sent and what actually happened was that mpv tried to resize itself to 0x0. This was obviously broken, so the reverted commit naively just ignored 0x0. It actually seemed to work, but it ended up breaking older versions of mutter. It's also not exactly the correct fix so it deserves a revert. This reverts commit d16defac27fcfe3e5fc43af6e42c2e590988cd3d. https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/stable/xdg-shell/xdg-shell.xml#L1050
-rw-r--r--video/out/wayland_common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index c77015de2f..8867deaaa3 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -768,9 +768,8 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel,
wl->toplevel_width = width;
wl->toplevel_height = height;
- /* Bail out if any of these values are 0 for any reason. */
- if (mp_rect_w(wl->geometry) == 0 || mp_rect_h(wl->geometry) == 0 ||
- width == 0 || height == 0)
+ /* Don't do anything here if we haven't finished setting geometry. */
+ if (mp_rect_w(wl->geometry) == 0 || mp_rect_h(wl->geometry) == 0)
return;
bool is_maximized = false;