[gtk+/gestures: 126/140] swipe: Don't emit ::swipe if there are still active touches
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gestures: 126/140] swipe: Don't emit ::swipe if there are still active touches
- Date: Wed, 7 May 2014 09:05:02 +0000 (UTC)
commit f774e79d884c9b28dd0752a0c31fa6e5bb8986dd
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Apr 17 13:05:11 2014 +0200
swipe: Don't emit ::swipe if there are still active touches
Avoids sending spurious signals when an extra touch happens.
gtk/gtkgestureswipe.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkgestureswipe.c b/gtk/gtkgestureswipe.c
index c322566..25a714e 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]