window/wayland: Differentiate between requested and direct resizes

meta_window_wayland_finish_move_resize() is called for both, finishing
a resize that has been requested through/by mutter and for resizes
directly done by the client. This introduces a CLIENT_RESIZE flag to
differentiate the former from the latter. Having this distinction is
required to know what the last requested size by either the client or
mutter is while ignoring older requests that might only have been
applied now.

This excludes client resizes when there are still pending
configurations, because the resize is known to be only temporary.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2066>
This commit is contained in:
Sebastian Keller 2021-11-04 04:35:22 +01:00 committed by Marge Bot
parent a49c98d8d8
commit 8eb268fc3b
2 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,7 @@ typedef enum
META_MOVE_RESIZE_WAYLAND_STATE_CHANGED = 1 << 9, META_MOVE_RESIZE_WAYLAND_STATE_CHANGED = 1 << 9,
META_MOVE_RESIZE_FORCE_UPDATE_MONITOR = 1 << 10, META_MOVE_RESIZE_FORCE_UPDATE_MONITOR = 1 << 10,
META_MOVE_RESIZE_PLACEMENT_CHANGED = 1 << 11, META_MOVE_RESIZE_PLACEMENT_CHANGED = 1 << 11,
META_MOVE_RESIZE_WAYLAND_CLIENT_RESIZE = 1 << 12,
} MetaMoveResizeFlags; } MetaMoveResizeFlags;
typedef enum typedef enum

View File

@ -944,6 +944,9 @@ meta_window_wayland_finish_move_resize (MetaWindow *window,
flags = META_MOVE_RESIZE_WAYLAND_FINISH_MOVE_RESIZE; flags = META_MOVE_RESIZE_WAYLAND_FINISH_MOVE_RESIZE;
if (!wl_window->pending_configurations)
flags |= META_MOVE_RESIZE_WAYLAND_CLIENT_RESIZE;
acked_configuration = acquire_acked_configuration (wl_window, pending); acked_configuration = acquire_acked_configuration (wl_window, pending);
/* x/y are ignored when we're doing interactive resizing */ /* x/y are ignored when we're doing interactive resizing */