mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
clutter: Ensure to reset touchpoints when disabling action
The action might not have been triggered yet, as per its trigger threshold. This doesn't mean we shouldn't reset the point(s) accumulated so far. This fixes those touchpoints persisting after disable/enable, thus making gesture recognition fail from there on. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1791>
This commit is contained in:
parent
b0a0be3ccc
commit
83ed2afe34
@ -572,8 +572,13 @@ clutter_gesture_action_set_enabled (ClutterActorMeta *meta,
|
|||||||
ClutterGestureActionPrivate *priv =
|
ClutterGestureActionPrivate *priv =
|
||||||
clutter_gesture_action_get_instance_private (gesture_action);
|
clutter_gesture_action_get_instance_private (gesture_action);
|
||||||
|
|
||||||
if (!is_enabled && priv->in_gesture)
|
if (!is_enabled)
|
||||||
cancel_gesture (gesture_action);
|
{
|
||||||
|
if (priv->in_gesture)
|
||||||
|
cancel_gesture (gesture_action);
|
||||||
|
else
|
||||||
|
g_array_set_size (priv->points, 0);
|
||||||
|
}
|
||||||
|
|
||||||
meta_class->set_enabled (meta, is_enabled);
|
meta_class->set_enabled (meta, is_enabled);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user