gestureclick: Only emit release for the same sequence

Avoid spurious releases when touching the same widget with another finger.
This commit is contained in:
Alexander Mikhaylenko 2020-11-12 15:26:36 +05:00
parent 74a7f73239
commit a651a0ce69

View File

@ -272,7 +272,7 @@ gtk_gesture_click_end (GtkGesture *gesture,
interpreted = gtk_gesture_get_point (gesture, current, &x, &y);
state = gtk_gesture_get_sequence_state (gesture, current);
if (state != GTK_EVENT_SEQUENCE_DENIED && interpreted)
if (current == sequence && state != GTK_EVENT_SEQUENCE_DENIED && interpreted)
g_signal_emit (gesture, signals[RELEASED], 0, priv->n_release, x, y);
priv->n_release = 0;