From 5b49e0853cae092a99bf5622a847066675408924 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Fri, 16 Feb 2024 13:54:31 +0800 Subject: [PATCH] core/events: Restore IS_GESTURE_EVENT check for X11 It got lost during feec896d85ea resulting in a PROPAGATE that should be STOP. For Wayland, gesture events are already handled (663f9d44). Fixes: feec896d85ea ("core: Simplify meta_display_handle_event()") Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3293 Part-of: --- src/core/events.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/core/events.c b/src/core/events.c index ec3832ae6..ff7299e37 100644 --- a/src/core/events.c +++ b/src/core/events.c @@ -46,6 +46,14 @@ #include "wayland/meta-wayland-private.h" #endif +#define IS_GESTURE_EVENT(et) ((et) == CLUTTER_TOUCHPAD_SWIPE || \ + (et) == CLUTTER_TOUCHPAD_PINCH || \ + (et) == CLUTTER_TOUCHPAD_HOLD || \ + (et) == CLUTTER_TOUCH_BEGIN || \ + (et) == CLUTTER_TOUCH_UPDATE || \ + (et) == CLUTTER_TOUCH_END || \ + (et) == CLUTTER_TOUCH_CANCEL) + #define IS_KEY_EVENT(et) ((et) == CLUTTER_KEY_PRESS || \ (et) == CLUTTER_KEY_RELEASE) @@ -467,7 +475,12 @@ meta_display_handle_event (MetaDisplay *display, if (meta_wayland_compositor_handle_event (wayland_compositor, event)) return CLUTTER_EVENT_STOP; } + else #endif + { + if (window && !IS_GESTURE_EVENT (event_type)) + return CLUTTER_EVENT_STOP; + } return CLUTTER_EVENT_PROPAGATE; }