mirror of
https://github.com/brl/mutter.git
synced 2025-03-12 06:15:11 +00:00
wayland: Add getter for the implicitly grabbed surface of a touch sequence
This will be used to implement the default MetaWaylandEventInterface at MetaWaylandSeat. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
This commit is contained in:
parent
20f7a60e11
commit
a98f1b2764
@ -637,6 +637,22 @@ meta_wayland_touch_get_press_coords (MetaWaylandTouch *touch,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MetaWaylandSurface *
|
||||||
|
meta_wayland_touch_get_surface (MetaWaylandTouch *touch,
|
||||||
|
ClutterEventSequence *sequence)
|
||||||
|
{
|
||||||
|
MetaWaylandTouchInfo *touch_info;
|
||||||
|
|
||||||
|
if (!touch->touches)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
touch_info = touch_get_info (touch, sequence, FALSE);
|
||||||
|
if (!touch_info || !touch_info->touch_surface)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return touch_info->touch_surface->surface;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_wayland_touch_init (MetaWaylandTouch *touch)
|
meta_wayland_touch_init (MetaWaylandTouch *touch)
|
||||||
{
|
{
|
||||||
|
@ -73,3 +73,6 @@ gboolean meta_wayland_touch_get_press_coords (MetaWaylandTouch *touch,
|
|||||||
|
|
||||||
gboolean meta_wayland_touch_can_popup (MetaWaylandTouch *touch,
|
gboolean meta_wayland_touch_can_popup (MetaWaylandTouch *touch,
|
||||||
uint32_t serial);
|
uint32_t serial);
|
||||||
|
|
||||||
|
MetaWaylandSurface * meta_wayland_touch_get_surface (MetaWaylandTouch *touch,
|
||||||
|
ClutterEventSequence *sequence);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user