From fb7cd18ebfd695065a47a48227e6fe211ab080a7 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 27 Feb 2024 12:55:25 +0100 Subject: [PATCH] wayland: Fetch seat input focus as focus for new pad devices Use the MetaWaylandSeat focus, and avoid peeking at MetaWaylandKeyboard internals. Part-of: --- src/wayland/meta-wayland-tablet-seat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-tablet-seat.c b/src/wayland/meta-wayland-tablet-seat.c index 308f42beb..2464361d4 100644 --- a/src/wayland/meta-wayland-tablet-seat.c +++ b/src/wayland/meta-wayland-tablet-seat.c @@ -192,7 +192,9 @@ static void meta_wayland_tablet_seat_device_added (MetaWaylandTabletSeat *tablet_seat, ClutterInputDevice *device) { - MetaWaylandSurface *pad_focus = tablet_seat->seat->keyboard->focus_surface; + MetaWaylandSurface *pad_focus; + + pad_focus = meta_wayland_seat_get_input_focus (tablet_seat->seat); if (is_tablet_device (device)) {