[mutter] window/x11: Keep buffer size if resize is not allowed
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window/x11: Keep buffer size if resize is not allowed
- Date: Wed, 14 Apr 2021 17:21:27 +0000 (UTC)
commit a2a161eb1e21b0919291da9eb7ccb553f1ea97ab
Author: Olivier Fourdan <ofourdan redhat com>
Date: Fri Mar 12 16:18:07 2021 +0100
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>
src/x11/window-x11.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 3f136af4f7..204b49e93e 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]