mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 11:30:45 -05:00
gesture-action: Prepare for clutter_gesture_action_cancel() within ::gesture-end
There may be odd situations where full gesture cancellation may be wanted at once when the first touch is lifted and ::gesture-end is emitted on a gesture action. Although calling clutter_gesture_action_cancel() within the ::gesture-end handler causes 2 critical warnings that are otherwise harmless. https://bugzilla.gnome.org/show_bug.cgi?id=732907
This commit is contained in:
parent
ec911dc8b9
commit
8d669ab8ce
@ -224,6 +224,9 @@ gesture_unregister_point (ClutterGestureAction *action, gint position)
|
|||||||
{
|
{
|
||||||
ClutterGestureActionPrivate *priv = action->priv;
|
ClutterGestureActionPrivate *priv = action->priv;
|
||||||
|
|
||||||
|
if (action->priv->points->len == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
g_array_remove_index (priv->points, position);
|
g_array_remove_index (priv->points, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -480,7 +483,7 @@ stage_captured_event_cb (ClutterActor *stage,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->points->len == 0)
|
if (priv->points->len == 0 && priv->stage_capture_id)
|
||||||
{
|
{
|
||||||
g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
|
g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
|
||||||
priv->stage_capture_id = 0;
|
priv->stage_capture_id = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user