[gtk+] window: Only claim the sequence if keeping the grab



commit 3f4df0644c76c88a57a0bbe57a4b469f5dddb71e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Jan 25 17:55:01 2015 +0000

    window: Only claim the sequence if keeping the grab
    
    If the grab belongs elsewhere, the window won't claim the sequence right
    away. The sequence may still be claimed afterwards when window dragging
    starts, but simple clicks won't be consumed this way.
    
    This makes it possible to close popovers when clicking on the title region,
    while still permitting touch/button 1 interaction for every other purpose.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743257

 gtk/gtkwindow.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 0fc9029..241f8ed 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1476,8 +1476,9 @@ multipress_gesture_pressed_cb (GtkGestureMultiPress *gesture,
       if (n_press == 1)
         priv->drag_possible = TRUE;
 
-      gtk_gesture_set_sequence_state (GTK_GESTURE (gesture),
-                                      sequence, GTK_EVENT_SEQUENCE_CLAIMED);
+      if (gtk_widget_has_grab (widget))
+        gtk_gesture_set_sequence_state (GTK_GESTURE (gesture),
+                                        sequence, GTK_EVENT_SEQUENCE_CLAIMED);
       break;
     default:
       if (!priv->maximized)


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