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:
parent
ec58e74cc5
commit
ccb49f75e4
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user