wayland: Add getter for the current surface of a tablet device

That would be the surface under the tool that is being currently used
on the device. This will be used by MetaWaylandSeat to implement the
default MetaWaylandEventInterface.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
This commit is contained in:
Carlos Garnacho
2023-11-14 23:24:23 +01:00
parent fe71588a2d
commit 20f7a60e11
4 changed files with 43 additions and 0 deletions

View File

@ -937,3 +937,16 @@ meta_wayland_tablet_tool_can_popup (MetaWaylandTabletTool *tool,
{
return tool->down_serial == serial || tool->button_serial == serial;
}
gboolean
meta_wayland_tablet_tool_has_current_tablet (MetaWaylandTabletTool *tool,
MetaWaylandTablet *tablet)
{
return tool->current_tablet == tablet;
}
MetaWaylandSurface *
meta_wayland_tablet_tool_get_current_surface (MetaWaylandTabletTool *tool)
{
return tool->current;
}