wayland: Add getter for the MetaWaylandPointer logical focus

Even though the logical focus is typically business that only the
MetaWaylandEventInterface mechanism minds about, there are some pointer
subsystems that want to look this up, as opposed to the current surface.

Add a getter to make this easier, without struct peeking.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3618>
This commit is contained in:
Carlos Garnacho 2024-02-26 11:59:15 +01:00 committed by Marge Bot
parent b102b6eca7
commit 7fc49f742b
2 changed files with 8 additions and 0 deletions

View File

@ -1420,6 +1420,12 @@ meta_wayland_pointer_get_current_surface (MetaWaylandPointer *pointer)
return pointer->current;
}
MetaWaylandSurface *
meta_wayland_pointer_get_focus_surface (MetaWaylandPointer *pointer)
{
return pointer->focus_surface;
}
MetaWaylandSurface *
meta_wayland_pointer_get_implicit_grab_surface (MetaWaylandPointer *pointer)
{

View File

@ -119,6 +119,8 @@ void meta_wayland_pointer_update_cursor_surface (MetaWaylandPointer *pointer);
MetaWaylandSurface * meta_wayland_pointer_get_current_surface (MetaWaylandPointer *pointer);
MetaWaylandSurface * meta_wayland_pointer_get_focus_surface (MetaWaylandPointer *pointer);
void meta_wayland_pointer_focus_surface (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface);