From ac089a1710b8866237245e3e04bbbeb9c151973b Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 15 Jul 2024 22:47:51 +0200 Subject: [PATCH] wayland: Ignore touch events in seat default focus handler Touch events are implicitly grabbed to the surface they began in, and are not affected by the focus handler. However these events will appear to come from the core pointer device, which might lead to the wrong device being updated. Ignore events with a sequence, since the default focus handler does not intend to do anything with them. Part-of: (cherry picked from commit 08c903a3599f061f63aeeab82910ed1800fafae4) --- src/wayland/meta-wayland-seat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c index 2301e0068..bea428555 100644 --- a/src/wayland/meta-wayland-seat.c +++ b/src/wayland/meta-wayland-seat.c @@ -215,6 +215,9 @@ default_focus (MetaWaylandEventHandler *handler, MetaWaylandSeat *seat = user_data; ClutterInputCapabilities caps; + if (sequence) + return; + caps = clutter_input_device_get_capabilities (device); if (caps &