clutter/click-action: Release if motion crosses drag threshold

When the drag threshold is crossed while the click action is pressed,
release it. This way, we can avoid spurious "clicked" signals from
being emitted.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1667>
This commit is contained in:
Georges Basile Stavracas Neto 2021-01-11 15:29:50 -03:00 committed by Marge Bot
parent 6239e6db18
commit 2c57f0986a

View File

@ -435,7 +435,7 @@ on_captured_event (ClutterActor *stage,
return CLUTTER_EVENT_PROPAGATE; return CLUTTER_EVENT_PROPAGATE;
if (!event_within_drag_threshold (action, event)) if (!event_within_drag_threshold (action, event))
click_action_cancel_long_press (action); clutter_click_action_release (action);
} }
break; break;