diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /widget/gtk/NativeMenuSupport.cpp | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/gtk/NativeMenuSupport.cpp')
-rw-r--r-- | widget/gtk/NativeMenuSupport.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/widget/gtk/NativeMenuSupport.cpp b/widget/gtk/NativeMenuSupport.cpp index 4360867fff..60517cd526 100644 --- a/widget/gtk/NativeMenuSupport.cpp +++ b/widget/gtk/NativeMenuSupport.cpp @@ -5,8 +5,11 @@ #include "mozilla/widget/NativeMenuSupport.h" +#include "mozilla/StaticPrefs_widget.h" #include "MainThreadUtils.h" #include "NativeMenuGtk.h" +#include "DBusMenu.h" +#include "nsWindow.h" namespace mozilla::widget { @@ -14,7 +17,14 @@ void NativeMenuSupport::CreateNativeMenuBar(nsIWidget* aParent, dom::Element* aMenuBarElement) { MOZ_RELEASE_ASSERT(NS_IsMainThread(), "Attempting to create native menu bar on wrong thread!"); - // TODO + +#ifdef MOZ_ENABLE_DBUS + if (aMenuBarElement && StaticPrefs::widget_gtk_global_menu_enabled() && + DBusMenuFunctions::Init()) { + static_cast<nsWindow*>(aParent)->SetDBusMenuBar( + DBusMenuBar::Create(aMenuBarElement)); + } +#endif } already_AddRefed<NativeMenu> NativeMenuSupport::CreateNativeContextMenu( |