[gtk+/gtk-3-22] GtkGestureMultiPress: check event state before emiting released signal



commit beed1f660eae6667669f6af21509d30279a33f38
Author: Juan Pablo Ugarte <ugarte endlessm com>
Date:   Mon Jan 22 11:20:14 2018 -0300

    GtkGestureMultiPress: check event state before emiting released signal
    
    Fix bug 771986 "Inconsistent 'row-activated' signal emission before \
    drag'n'drop, 'activate-on-single-click'=TRUE, 'reorderable'=TRUE"

 gtk/gtkgesturemultipress.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkgesturemultipress.c b/gtk/gtkgesturemultipress.c
index c985f7b..f2fa07f 100644
--- a/gtk/gtkgesturemultipress.c
+++ b/gtk/gtkgesturemultipress.c
@@ -279,7 +279,9 @@ gtk_gesture_multi_press_end (GtkGesture       *gesture,
   current = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
   gtk_gesture_get_point (gesture, current, &x, &y);
 
-  g_signal_emit (gesture, signals[RELEASED], 0, priv->n_release, x, y);
+  if (gtk_gesture_get_sequence_state (gesture, current) != GTK_EVENT_SEQUENCE_DENIED)
+    g_signal_emit (gesture, signals[RELEASED], 0, priv->n_release, x, y);
+
   priv->n_release = 0;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]