wayland: Add meta_wayland_seat_get_input_focus_client() call

This call is meant to replace meta_wayland_keyboard_get_focus_client(),
since we will always have a MetaWaylandSeat with an input focus (or not),
but we may or may not have a MetaWaylandKeyboard.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3707>
This commit is contained in:
Carlos Garnacho 2024-04-15 22:36:37 +02:00 committed by Marge Bot
parent cad9a65b07
commit 743fb6df30
2 changed files with 11 additions and 0 deletions

View File

@ -720,3 +720,12 @@ meta_wayland_seat_get_current_surface (MetaWaylandSeat *seat,
return NULL;
}
struct wl_client *
meta_wayland_seat_get_input_focus_client (MetaWaylandSeat *seat)
{
if (seat->input_focus)
return wl_resource_get_client (seat->input_focus->resource);
else
return NULL;
}

View File

@ -98,3 +98,5 @@ MetaWaylandInput * meta_wayland_seat_get_input (MetaWaylandSeat *seat);
MetaWaylandSurface * meta_wayland_seat_get_current_surface (MetaWaylandSeat *seat,
ClutterInputDevice *device,
ClutterEventSequence *sequence);
struct wl_client * meta_wayland_seat_get_input_focus_client (MetaWaylandSeat *seat);