Disable opening of new tabs when double-clicking on the tabbar when the tabbar is unified with the titlebar, on GTK. (Bug 635397) r=dao a2.0=beltzner
authorL. David Baron <dbaron@dbaron.org>
Wed, 23 Feb 2011 12:07:35 -0800
changeset 63021 a820f7f5e50ed95e24e7e29c355d97943e62fad8
parent 63020 c011e21f29f891e9a233c6e0799dfd6974a769e5
child 63023 8476781d5d2527104cd5b77ae2ace174ae2b0183
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersdao
bugs635397
milestone2.0b13pre
Disable opening of new tabs when double-clicking on the tabbar when the tabbar is unified with the titlebar, on GTK. (Bug 635397) r=dao a2.0=beltzner
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -3081,17 +3081,26 @@
 
         if (tab.getAttribute("fadein") == "true")
           this._handleNewTab(tab);
         else if (this.tabbrowser._removingTabs.indexOf(tab) > -1)
           this.tabbrowser._endRemoveTab(tab);
       ]]></handler>
 
       <handler event="dblclick"><![CDATA[
-        // See hack note in the tabbrowser-close-button binding
+#ifdef MOZ_WIDGET_GTK2
+        // Disable this on GTK2 when the menubar is draggable, since (a)
+        // the menubar and tabbbar have unified appearance and should
+        // thus not have different behavior (though this condition alone
+        // applies to more cases) and (b) it interacts badly with the
+        // drag handling that we use for dragging either one.
+        if (this.parentNode._dragBindingAlive)
+          return;
+#endif
+        // See hack note in the tabbrowser-close-tab-button binding
         if (!this._blockDblClick && event.button == 0 &&
             event.originalTarget.localName == "box")
           BrowserOpenTab();
       ]]></handler>
 
       <handler event="click"><![CDATA[
         if (event.button != 1)
           return;