From 35335e65af75a58c8ca7f2bb3a325884155b34b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= Date: Wed, 21 Feb 2024 13:31:30 +0100 Subject: [PATCH] window: Queue resize if window is maximized on wayland When multiple configure requests sent to the wayland client within a sort period, maximized windows may end up in wrong position and cover struts. To avoid this, queue a resize when the resize event sent by the wayland client results a changed size or position to ensure that the final size and position will be always right. Part-of: --- src/core/window.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index 62a98e070..47c29d94a 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -3928,6 +3928,14 @@ meta_window_move_resize_internal (MetaWindow *window, if (flags & META_MOVE_RESIZE_WAYLAND_CLIENT_RESIZE) meta_window_queue (window, META_QUEUE_MOVE_RESIZE); + + /* This is a workaround for #1627. We still don't have any tests that can + * reproduce this issue reliably and this is not a proper fix! */ + if (flags & META_MOVE_RESIZE_WAYLAND_FINISH_MOVE_RESIZE && + (result & META_MOVE_RESIZE_RESULT_MOVED || + result & META_MOVE_RESIZE_RESULT_RESIZED) && + (window->maximized_horizontally || window->maximized_vertically)) + meta_window_queue (window, META_QUEUE_MOVE_RESIZE); } /**