[nautilus/wip/ernestask/671] pathbar: Claim path bar button presses



commit 8349a017f54c8fe41164b960bee97d752ceeaf0a
Author: Ernestas Kulik <ernestask gnome org>
Date:   Thu Oct 4 15:14:30 2018 +0300

    pathbar: Claim path bar button presses
    
    Since these are forwarded to the title bar, in cases where the middle
    click does something special (e.g. minimize the window), unintended
    side-effects might be observed in conjunction to opening the location in
    a new tab. Claiming the sequence helps prevent that.
    
    Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/671

 src/nautilus-pathbar.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index b3188d8de..d22a614e9 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -1227,9 +1227,12 @@ on_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
             /* Ignore other buttons in this gesture. GtkButton will claim the
              * primary button presses and emit the "clicked" signal.
              */
+            return;
         }
         break;
     }
+
+    gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
 }
 
 static GIcon *


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