window/wayland: Don't inhibit finishing moves if any window is resized

meta_window_wayland_finish_move_resize() inhibited window moves to be
finished if there was a resize grab active at the time, in order to
handle window resizing. Change this to only affect the grabbed window
itself, so that e.g. a popup can be positioned according to a pending
configuration while there is an active resize grab.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
This commit is contained in:
Jonas Ådahl 2019-07-26 18:49:17 +02:00 committed by Carlos Garnacho
parent 64eaf70279
commit 7f9fac2ba2

View File

@ -798,12 +798,14 @@ meta_window_wayland_finish_move_resize (MetaWindow *window,
MetaWaylandSurfaceState *pending) MetaWaylandSurfaceState *pending)
{ {
MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (window); MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (window);
MetaDisplay *display = window->display;
int dx, dy; int dx, dy;
int geometry_scale; int geometry_scale;
int gravity; int gravity;
MetaRectangle rect; MetaRectangle rect;
MetaMoveResizeFlags flags; MetaMoveResizeFlags flags;
MetaWaylandWindowConfiguration *acked_configuration; MetaWaylandWindowConfiguration *acked_configuration;
gboolean is_window_being_resized;
/* new_geom is in the logical pixel coordinate space, but MetaWindow wants its /* new_geom is in the logical pixel coordinate space, but MetaWindow wants its
* rects to represent what in turn will end up on the stage, i.e. we need to * rects to represent what in turn will end up on the stage, i.e. we need to
@ -830,7 +832,10 @@ meta_window_wayland_finish_move_resize (MetaWindow *window,
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 */
if (!meta_grab_op_is_resizing (window->display->grab_op)) is_window_being_resized = (meta_grab_op_is_resizing (display->grab_op) &&
display->grab_window == window);
if (!is_window_being_resized)
{ {
if (acked_configuration) if (acked_configuration)
{ {