summaryrefslogtreecommitdiff
path: root/gtk/gtkgestureswipe.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2014-04-17 13:05:11 +0200
committerCarlos Garnacho <carlosg@gnome.org>2014-05-23 19:54:28 +0200
commitcbe47c02a125988e5153ff957c48ec7b338da93d (patch)
tree5f8d9f39f7dcd46c534579a5e2421e8e71a16650 /gtk/gtkgestureswipe.c
parent42df9eda2d469eddc8f576aa09f80cdcc72a883a (diff)
downloadgtk+-cbe47c02a125988e5153ff957c48ec7b338da93d.tar.gz
swipe: Don't emit ::swipe if there are still active touches
Avoids sending spurious signals when an extra touch happens.
Diffstat (limited to 'gtk/gtkgestureswipe.c')
-rw-r--r--gtk/gtkgestureswipe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkgestureswipe.c b/gtk/gtkgestureswipe.c
index c322566b59..25a714e69b 100644
--- a/gtk/gtkgestureswipe.c
+++ b/gtk/gtkgestureswipe.c
@@ -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);