core/events: Restore IS_GESTURE_EVENT check for X11

It got lost during feec896d85 resulting in a PROPAGATE that should
be STOP.

For Wayland, gesture events are already handled (663f9d44).

Fixes: feec896d85 ("core: Simplify meta_display_handle_event()")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3293
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3589>
This commit is contained in:
Daniel van Vugt 2024-02-16 13:54:31 +08:00 committed by Marge Bot
parent dc2b2e379b
commit 5b49e0853c

View File

@ -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;
}