1
0
Fork 0

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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2342>
This commit is contained in:
Jonas Dreßler 2022-04-04 03:22:12 +02:00 committed by Marge Bot
parent 53b6d4abb1
commit d374feb55f
2 changed files with 3 additions and 19 deletions

View file

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

View file

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