From d16defac27fcfe3e5fc43af6e42c2e590988cd3d Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sun, 23 Jan 2022 13:41:11 -0600 Subject: wayland: ignore 0x0 resizes Apparently mutter can send us 0x0 resizes* for whatever reason. Probably there's some interal reason why this occurs, but for us trying to resize to 0x0 is obviously terrible and results in all kinds of brokenness. Just ignore any 0 values. Fixes #9748. *: https://gitlab.gnome.org/GNOME/mutter/-/issues/2091 --- video/out/wayland_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'video/out') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index ae657ec952..0806e048ed 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -768,8 +768,9 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel, wl->toplevel_width = width; wl->toplevel_height = height; - /* 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) + /* 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) return; bool is_maximized = false; -- cgit v1.2.3