clutter/click-action: Handle touch cancel events

It's important to cancel click actions when we get a touch cancel event,
otherwise the long press event might get emitted after the compositor
took over the touches because it detected a gesture.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/396
This commit is contained in:
Jonas Dreßler 2019-05-03 12:21:30 +02:00 committed by Carlos Garnacho
parent dae2c1d420
commit 9e0e35d2a7

View File

@ -355,6 +355,10 @@ on_captured_event (ClutterActor *stage,
switch (clutter_event_type (event))
{
case CLUTTER_TOUCH_CANCEL:
clutter_click_action_release (action);
break;
case CLUTTER_TOUCH_END:
has_button = FALSE;
case CLUTTER_BUTTON_RELEASE: