From 27131198c702d07b43e8bba2d1bf15ffef489ade Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 23 Nov 2020 10:07:45 +0100 Subject: [PATCH] window: Fix size hints with CSD Commit 03c69ed8 ("Do not go past size hints on resize") was meant to ensure the size hints set by the client would be honored during resize, as going past those values could cause the window to move on resize. However, it did so by calling ensure_size_hints_satisfied() which works with the frame rect rather than the client rect. As a result, the minimum size enforced would end up being larger than expected with client-side decorations. Use meta_window_maybe_apply_size_hints() instead which automatically adjusts for client size. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1542 Part-of: --- src/core/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/window.c b/src/core/window.c index 944d0d8fe..2268d1fd7 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -6322,7 +6322,7 @@ update_resize (MetaWindow *window, else if (window->display->grab_op & META_GRAB_OP_WINDOW_DIR_NORTH) new_rect.height -= dy; - ensure_size_hints_satisfied (&new_rect, &window->size_hints); + meta_window_maybe_apply_size_hints (window, &new_rect); /* If we're waiting for a request for _NET_WM_SYNC_REQUEST, we'll * resize the window when the window responds, or when we time