swipe: Don't emit ::swipe if there are still active touches

Avoids sending spurious signals when an extra touch happens.
This commit is contained in:
Carlos Garnacho
2014-04-17 13:05:11 +02:00
parent 42df9eda2d
commit cbe47c02a1

View File

@@ -172,6 +172,9 @@ gtk_gesture_swipe_end (GtkGesture *gesture,
if (gtk_gesture_get_sequence_state (gesture, seq) == GTK_EVENT_SEQUENCE_DENIED)
return;
if (gtk_gesture_is_active (gesture))
return;
priv = gtk_gesture_swipe_get_instance_private (swipe);
_gtk_gesture_swipe_calculate_velocity (swipe, &velocity_x, &velocity_y);
g_signal_emit (gesture, signals[SWIPE], 0, velocity_x, velocity_y);