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:
|
case CLUTTER_ENTER:
|
||||||
click_action_set_pressed (click_action, priv->is_held);
|
click_action_set_pressed (click_action, priv->is_held);
|
||||||
break;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
|
|
||||||
case CLUTTER_LEAVE:
|
case CLUTTER_LEAVE:
|
||||||
click_action_set_pressed (click_action, FALSE);
|
click_action_set_pressed (click_action, FALSE);
|
||||||
click_action_cancel_long_press (click_action);
|
click_action_cancel_long_press (click_action);
|
||||||
break;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
|
|
||||||
case CLUTTER_TOUCH_CANCEL:
|
case CLUTTER_TOUCH_CANCEL:
|
||||||
clutter_click_action_release (click_action);
|
clutter_click_action_release (click_action);
|
||||||
|
@ -378,6 +378,10 @@ clutter_gesture_action_handle_event (ClutterAction *action,
|
|||||||
return CLUTTER_EVENT_PROPAGATE;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (clutter_event_type (event))
|
||||||
|
{
|
||||||
|
case CLUTTER_ENTER:
|
||||||
|
case CLUTTER_LEAVE:
|
||||||
if (point &&
|
if (point &&
|
||||||
event_type == CLUTTER_LEAVE &&
|
event_type == CLUTTER_LEAVE &&
|
||||||
(event->crossing.flags & CLUTTER_EVENT_FLAG_GRAB_NOTIFY) != 0)
|
(event->crossing.flags & CLUTTER_EVENT_FLAG_GRAB_NOTIFY) != 0)
|
||||||
@ -386,12 +390,10 @@ clutter_gesture_action_handle_event (ClutterAction *action,
|
|||||||
|
|
||||||
if (priv->in_gesture)
|
if (priv->in_gesture)
|
||||||
cancel_gesture (gesture_action);
|
cancel_gesture (gesture_action);
|
||||||
|
|
||||||
return CLUTTER_EVENT_PROPAGATE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (clutter_event_type (event))
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
{
|
|
||||||
case CLUTTER_BUTTON_PRESS:
|
case CLUTTER_BUTTON_PRESS:
|
||||||
case CLUTTER_TOUCH_BEGIN:
|
case CLUTTER_TOUCH_BEGIN:
|
||||||
if (priv->stage == NULL)
|
if (priv->stage == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user