[mutter] clutter/click-action: Handle touch cancel events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/click-action: Handle touch cancel events
- Date: Mon, 13 May 2019 09:53:14 +0000 (UTC)
commit 9e0e35d2a7862a8c2152b0d37645fad6b6bffdac
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri May 3 12:21:30 2019 +0200
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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]