From d374feb55f0b814a0542976640dedb9633080772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Mon, 4 Apr 2022 03:22:12 +0200 Subject: [PATCH] events: Make MetaGestureTracker work with the action event delivery ClutterActions now no longer receive their events via clutter_actor_event(), instead they get special treatment by the stage now. Make the MetaGestureTracker work with this and stop emitting events directly to Clutter via clutter_actor_event(), but instead let them get through to Clutter (but still not to Wayland). Part-of: --- src/core/events.c | 3 ++- src/core/meta-gesture-tracker.c | 19 +------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/core/events.c b/src/core/events.c index 55c8b86cc..1767dded3 100644 --- a/src/core/events.c +++ b/src/core/events.c @@ -365,7 +365,8 @@ meta_display_handle_event (MetaDisplay *display, if (meta_gesture_tracker_handle_event (gesture_tracker, event)) { - bypass_wayland = bypass_clutter = TRUE; + bypass_wayland = TRUE; + bypass_clutter = FALSE; goto out; } diff --git a/src/core/meta-gesture-tracker.c b/src/core/meta-gesture-tracker.c index 2bb07c3ce..f05c09000 100644 --- a/src/core/meta-gesture-tracker.c +++ b/src/core/meta-gesture-tracker.c @@ -502,25 +502,8 @@ meta_gesture_tracker_handle_event (MetaGestureTracker *tracker, break; } - /* As soon as a sequence is accepted, we replay it to - * the stage as a captured event, and make sure it's never - * propagated anywhere else. Since ClutterGestureAction does - * all its event handling from a captured-event handler on - * the stage, this effectively acts as a "sequence grab" on - * gesture actions. - * - * Sequences that aren't (yet or never) in an accepted state - * will go through, these events will get processed through - * the compositor, and eventually through clutter, still - * triggering the gestures capturing events on the stage, and - * possibly resulting in MetaSequenceState changes. - */ if (state == META_SEQUENCE_ACCEPTED) - { - clutter_actor_event (CLUTTER_ACTOR (clutter_event_get_stage (event)), - event, TRUE); - return TRUE; - } + return TRUE; return FALSE; }