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:
parent
53b6d4abb1
commit
d374feb55f
@ -365,7 +365,8 @@ meta_display_handle_event (MetaDisplay *display,
|
|||||||
|
|
||||||
if (meta_gesture_tracker_handle_event (gesture_tracker, event))
|
if (meta_gesture_tracker_handle_event (gesture_tracker, event))
|
||||||
{
|
{
|
||||||
bypass_wayland = bypass_clutter = TRUE;
|
bypass_wayland = TRUE;
|
||||||
|
bypass_clutter = FALSE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,25 +502,8 @@ meta_gesture_tracker_handle_event (MetaGestureTracker *tracker,
|
|||||||
break;
|
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)
|
if (state == META_SEQUENCE_ACCEPTED)
|
||||||
{
|
return TRUE;
|
||||||
clutter_actor_event (CLUTTER_ACTOR (clutter_event_get_stage (event)),
|
|
||||||
event, TRUE);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user