From bf4d46097bd30fd811ffbc687740b4ad1fe7dec2 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 27 Feb 2024 13:09:55 +0100 Subject: [PATCH] wayland: Add getter for the pointer focus client Similarly to MetaWaylandKeyboard, there's some subsystems that want access to this, e.g. touchpad gestures. Part-of: --- src/wayland/meta-wayland-pointer.c | 6 ++++++ src/wayland/meta-wayland-pointer.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index afa2c90b6..59c80fa48 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -1460,3 +1460,9 @@ meta_wayland_pointer_get_implicit_grab_surface (MetaWaylandPointer *pointer) return NULL; } + +MetaWaylandPointerClient * +meta_wayland_pointer_get_focus_client (MetaWaylandPointer *pointer) +{ + return pointer->focus_client; +} diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h index 7c4e38110..066108960 100644 --- a/src/wayland/meta-wayland-pointer.h +++ b/src/wayland/meta-wayland-pointer.h @@ -129,3 +129,5 @@ void meta_wayland_pointer_focus_surface (MetaWaylandPointer *pointer, MetaWaylandSurface *surface); MetaWaylandSurface * meta_wayland_pointer_get_implicit_grab_surface (MetaWaylandPointer *pointer); + +MetaWaylandPointerClient * meta_wayland_pointer_get_focus_client (MetaWaylandPointer *pointer);