mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
wayland: Find touch grab sequence in subsurfaces also
With libdecor, window moving/resizing only works with the pointer, not with touch. The meta_wayland_pointer_can_grab_surface checks for subsurfaces, but the meta_wayland_touch_find_grab_sequence does not. Add a similar subsurface check to meta_wayland_touch_find_grab_sequence. Closes: GNOME/mutter#2872 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3125>
This commit is contained in:
parent
ffd3aedbf5
commit
7b04e8be15
@ -553,6 +553,25 @@ meta_wayland_touch_can_popup (MetaWaylandTouch *touch,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
touch_can_grab_surface (MetaWaylandTouchInfo *touch_info,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
MetaWaylandSurface *subsurface;
|
||||
|
||||
if (touch_info->touch_surface->surface == surface)
|
||||
return TRUE;
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state,
|
||||
subsurface)
|
||||
{
|
||||
if (touch_can_grab_surface (touch_info, subsurface))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ClutterEventSequence *
|
||||
meta_wayland_touch_find_grab_sequence (MetaWaylandTouch *touch,
|
||||
MetaWaylandSurface *surface,
|
||||
@ -571,7 +590,7 @@ meta_wayland_touch_find_grab_sequence (MetaWaylandTouch *touch,
|
||||
(gpointer*) &touch_info))
|
||||
{
|
||||
if (touch_info->slot_serial == serial &&
|
||||
touch_info->touch_surface->surface == surface)
|
||||
touch_can_grab_surface (touch_info, surface))
|
||||
return sequence;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user