summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2021-03-12 16:18:07 +0100
committerMarge Bot <marge-bot@gnome.org>2021-04-14 16:51:21 +0000
commita2a161eb1e21b0919291da9eb7ccb553f1ea97ab (patch)
treed9c1f6317a9786b72f4e90c3009f02928f24a95d
parentcc928ba7d21b837842203b22c080a72b3a380adb (diff)
downloadmutter-a2a161eb1e21b0919291da9eb7ccb553f1ea97ab.tar.gz
window/x11: Keep buffer size if resize is not allowed
Mutter would deny the application the right to resize itself during an interactive resize, to avoid the user and the client to fight for the size. When the client is not allowed to resize, it would use the client rect rather than the buffer rect. As a result, the client window with client side decorations would quickly shrink to its minimum size. Use the buffer rect instead, so that the size really remains the same. https://gitlab.gnome.org/GNOME/mutter/-/issues/1674 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1777>
-rw-r--r--src/x11/window-x11.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 3f136af4f..204b49e93 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -2502,6 +2502,7 @@ meta_window_move_resize_request (MetaWindow *window,
gboolean allow_position_change;
gboolean in_grab_op;
MetaMoveResizeFlags flags;
+ MetaRectangle buffer_rect;
/* We ignore configure requests while the user is moving/resizing
* the window, since these represent the app sucking and fighting
@@ -2573,8 +2574,9 @@ meta_window_move_resize_request (MetaWindow *window,
window->type);
}
- width = window->rect.width;
- height = window->rect.height;
+ meta_window_get_buffer_rect (window, &buffer_rect);
+ width = buffer_rect.width;
+ height = buffer_rect.height;
if (!in_grab_op || !meta_grab_op_is_resizing (window->display->grab_op))
{
if (value_mask & CWWidth)