1
0
Fork 0

clutter/actions: Never stop crossing events

Crossing events should never be stopped during event emission. We
already have a check that enforces this in clutter_actor_event(), but
ClutterActions still sometimes try to stop crossing events from
propagating.

Improve that situation and return CLUTTER_EVENT_PROPAGATE when handling
crossings in ClutterActions, too.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2342>
This commit is contained in:
Jonas Dreßler 2022-04-04 11:14:22 +02:00 committed by Marge Bot
parent ec58e74cc5
commit ccb49f75e4
2 changed files with 16 additions and 14 deletions

View file

@ -343,12 +343,12 @@ clutter_click_action_handle_event (ClutterAction *action,
case CLUTTER_ENTER:
click_action_set_pressed (click_action, priv->is_held);
break;
return CLUTTER_EVENT_PROPAGATE;
case CLUTTER_LEAVE:
click_action_set_pressed (click_action, FALSE);
click_action_cancel_long_press (click_action);
break;
return CLUTTER_EVENT_PROPAGATE;
case CLUTTER_TOUCH_CANCEL:
clutter_click_action_release (click_action);

View file

@ -378,20 +378,22 @@ clutter_gesture_action_handle_event (ClutterAction *action,
return CLUTTER_EVENT_PROPAGATE;
}
if (point &&
event_type == CLUTTER_LEAVE &&
(event->crossing.flags & CLUTTER_EVENT_FLAG_GRAB_NOTIFY) != 0)
{
gesture_unregister_point (gesture_action, position);
if (priv->in_gesture)
cancel_gesture (gesture_action);
return CLUTTER_EVENT_PROPAGATE;
}
switch (clutter_event_type (event))
{
case CLUTTER_ENTER:
case CLUTTER_LEAVE:
if (point &&
event_type == CLUTTER_LEAVE &&
(event->crossing.flags & CLUTTER_EVENT_FLAG_GRAB_NOTIFY) != 0)
{
gesture_unregister_point (gesture_action, position);
if (priv->in_gesture)
cancel_gesture (gesture_action);
}
return CLUTTER_EVENT_PROPAGATE;
case CLUTTER_BUTTON_PRESS:
case CLUTTER_TOUCH_BEGIN:
if (priv->stage == NULL)