From 9e0e35d2a7862a8c2152b0d37645fad6b6bffdac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Fri, 3 May 2019 12:21:30 +0200 Subject: [PATCH] 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 --- clutter/clutter/clutter-click-action.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clutter/clutter/clutter-click-action.c b/clutter/clutter/clutter-click-action.c index f7b73cc15..5b4c99f72 100644 --- a/clutter/clutter/clutter-click-action.c +++ b/clutter/clutter/clutter-click-action.c @@ -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: