diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-03-10 02:42:56 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-03-21 10:57:08 +0000 |
commit | 6d4844558268ec03da863175e1dc8d571c05ec46 (patch) | |
tree | 6662cd8477ddb9d41edf358d02a62361482cacc8 | |
parent | 519254aa32b5ad8a3ae8544d89f76884ab2f6afb (diff) |
Keep menubar hidden after Unity registrar activated
... if it was hidden before. Otherwise it becomes
out of sync with MenuBar::mbDisplayable.
Change-Id: I03c551ee70131a50fa694b7009c24833ac391990
Reviewed-on: https://gerrit.libreoffice.org/35487
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 1 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksalmenu.cxx | 9 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 7590a711279b..cfc6f4548f8c 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -724,7 +724,6 @@ void on_registrar_available( GDBusConnection * /*connection*/, { GtkSalMenu* pGtkSalMenu = static_cast<GtkSalMenu*>(pSalMenu); pGtkSalMenu->EnableUnity(true); - pGtkSalMenu->UpdateFull(); } } diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index 756cca26a498..e3d5b4cbe2de 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -1159,14 +1159,19 @@ void GtkSalMenu::EnableUnity(bool bEnable) bUnityMode = bEnable; MenuBar* pMenuBar(static_cast<MenuBar*>(mpVCLMenu.get())); + bool bDisplayable(pMenuBar->IsDisplayable()); if (bEnable) + { DestroyMenuBarWidget(); + UpdateFull(); + if (!bDisplayable) + ShowMenuBar(false); + } else { Update(); - if (pMenuBar->IsDisplayable()) - CreateMenuBarWidget(); + ShowMenuBar(bDisplayable); } pMenuBar->LayoutChanged(); diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 2752fc75e172..1a4823eb3eb5 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -739,7 +739,6 @@ void on_registrar_available( GDBusConnection * /*connection*/, { GtkSalMenu* pGtkSalMenu = static_cast<GtkSalMenu*>(pSalMenu); pGtkSalMenu->EnableUnity(true); - pGtkSalMenu->UpdateFull(); } } |