diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 67007ffb1..4103b62bf 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -1091,6 +1091,14 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer, g_signal_emit (pointer, signals[FOCUS_SURFACE_CHANGED], 0); } +void +meta_wayland_pointer_focus_surface (MetaWaylandPointer *pointer, + MetaWaylandSurface *surface) +{ + const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface; + interface->focus (pointer->grab, surface); +} + void meta_wayland_pointer_start_grab (MetaWaylandPointer *pointer, MetaWaylandPointerGrab *grab) diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h index a28108d5f..9a64bad1b 100644 --- a/src/wayland/meta-wayland-pointer.h +++ b/src/wayland/meta-wayland-pointer.h @@ -161,3 +161,6 @@ 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); + +void meta_wayland_pointer_focus_surface (MetaWaylandPointer *pointer, + MetaWaylandSurface *surface);