From 4f946b0b2cd05f8c9620ba762eab7177f3b56d89 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 9 Jan 2021 13:43:31 -0500 Subject: Backport UXP#1578 - Add global menubar support for GTK --- base/content/browser-menubar.inc | 4 ++++ base/content/browser.js | 4 ++++ components/places/content/places.xul | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/base/content/browser-menubar.inc b/base/content/browser-menubar.inc index 702c5ec..04e4634 100644 --- a/base/content/browser-menubar.inc +++ b/base/content/browser-menubar.inc @@ -5,7 +5,11 @@ diff --git a/base/content/browser.js b/base/content/browser.js index 22838d1..352f5e6 100755 --- a/base/content/browser.js +++ b/base/content/browser.js @@ -4708,6 +4708,10 @@ function getTogglableToolbars() { let toolbarNodes = Array.slice(gNavToolbox.childNodes); toolbarNodes = toolbarNodes.concat(gNavToolbox.externalToolbars); toolbarNodes = toolbarNodes.filter(node => node.getAttribute("toolbarname")); +#ifdef MOZ_WIDGET_GTK + if (document.documentElement.getAttribute("shellshowingmenubar") == "true") + toolbarNodes = toolbarNodes.filter(node => node.id != "toolbar-menubar"); +#endif return toolbarNodes; } diff --git a/components/places/content/places.xul b/components/places/content/places.xul index 16c3385..6d2cdf1 100644 --- a/components/places/content/places.xul +++ b/components/places/content/places.xul @@ -156,8 +156,12 @@ #ifdef XP_MACOSX #else +#endif