mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
window/wayland: Detect client resizes with pending non-resizes
The previous code was trying to detect client resizes by only considering resizes without any pending configurations as client resizes. There can however be pending configurations that do not involve resizing, such as ones triggered by state changes. These may also stay unacknowledged by the client until the next size change. This was causing client resizes after showing the window (and therefore changing its status to focused) to not be detected as client resize. Fix this by checking whether the queue has any configuration with size changes rather than just whether it is empty. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2023 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2103>
This commit is contained in:
parent
67033b0acd
commit
d66e3e2d8a
@ -861,6 +861,22 @@ acquire_acked_configuration (MetaWindowWayland *wl_window,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
has_pending_resize (MetaWindowWayland *wl_window)
|
||||||
|
{
|
||||||
|
GList *l;
|
||||||
|
|
||||||
|
for (l = wl_window->pending_configurations; l; l = l->next)
|
||||||
|
{
|
||||||
|
MetaWaylandWindowConfiguration *configuration = l->data;
|
||||||
|
|
||||||
|
if (configuration->has_size)
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
meta_window_wayland_get_geometry_scale (MetaWindow *window)
|
meta_window_wayland_get_geometry_scale (MetaWindow *window)
|
||||||
{
|
{
|
||||||
@ -944,7 +960,7 @@ 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)
|
if (!has_pending_resize (wl_window))
|
||||||
flags |= META_MOVE_RESIZE_WAYLAND_CLIENT_RESIZE;
|
flags |= META_MOVE_RESIZE_WAYLAND_CLIENT_RESIZE;
|
||||||
|
|
||||||
acked_configuration = acquire_acked_configuration (wl_window, pending);
|
acked_configuration = acquire_acked_configuration (wl_window, pending);
|
||||||
|
Loading…
Reference in New Issue
Block a user