mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
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>
This commit is contained in:
parent
cc928ba7d2
commit
a2a161eb1e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user