Commit 00c25a4c authored by verdre's avatar verdre

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.

GNOME/mutter!396
parent 60d22b7c
Pipeline #52067 passed with stages
in 6 minutes and 44 seconds
......@@ -355,6 +355,25 @@ on_captured_event (ClutterActor *stage,
switch (clutter_event_type (event))
{
case CLUTTER_TOUCH_CANCEL:
click_action_set_held (action, FALSE);
click_action_cancel_long_press (action);
click_action_set_pressed (action, FALSE);
if (priv->capture_id != 0)
{
g_signal_handler_disconnect (priv->stage, priv->capture_id);
priv->capture_id = 0;
}
if (priv->long_press_id != 0)
{
g_source_remove (priv->long_press_id);
priv->long_press_id = 0;
}
break;
case CLUTTER_TOUCH_END:
has_button = FALSE;
case CLUTTER_BUTTON_RELEASE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment