wayland: Add getter for MetaWaylandPointer current surface

This is the surface currently under the pointer, and 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:22:53 +01:00
parent 09101e36f8
commit fe71588a2d
2 changed files with 8 additions and 0 deletions

View File

@ -1536,3 +1536,9 @@ meta_wayland_pointer_is_grabbed (MetaWaylandPointer *pointer)
{
return pointer->grab != &pointer->default_grab;
}
MetaWaylandSurface *
meta_wayland_pointer_get_current_surface (MetaWaylandPointer *pointer)
{
return pointer->current;
}

View File

@ -159,3 +159,5 @@ void meta_wayland_surface_cursor_update (MetaWaylandSurface *cursor_surface);
void meta_wayland_pointer_update_cursor_surface (MetaWaylandPointer *pointer);
gboolean meta_wayland_pointer_is_grabbed (MetaWaylandPointer *pointer);
MetaWaylandSurface * meta_wayland_pointer_get_current_surface (MetaWaylandPointer *pointer);