vcl/unx/gtk/gtksalframe.cxx | 1 - vcl/unx/gtk/gtksalmenu.cxx | 11 ++++++++--- vcl/unx/gtk3/gtk3gtkframe.cxx | 1 - 3 files changed, 8 insertions(+), 5 deletions(-)
New commits: commit 6d4844558268ec03da863175e1dc8d571c05ec46 Author: Maxim Monastirsky <[email protected]> Date: Fri Mar 10 02:42:56 2017 +0200 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 <[email protected]> Reviewed-by: Thorsten Behrens <[email protected]> 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(); } } commit 519254aa32b5ad8a3ae8544d89f76884ab2f6afb Author: Maxim Monastirsky <[email protected]> Date: Fri Mar 10 01:12:08 2017 +0200 gtk3: Keep menubar hidden after customization ... if it was hidden before. Otherwise it becomes out of sync with MenuBar::mbDisplayable. Change-Id: I4957f5cef916abfa54add2901b330463364d3dba Reviewed-on: https://gerrit.libreoffice.org/35486 Tested-by: Jenkins <[email protected]> Reviewed-by: Thorsten Behrens <[email protected]> diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index 807470ab1066..756cca26a498 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -847,7 +847,7 @@ void GtkSalMenu::SetFrame(const SalFrame* pFrame) g_lo_menu_insert_section( pMenuModel, 0, nullptr, mpMenuModel ); #if GTK_CHECK_VERSION(3,0,0) - if (!bUnityMode) + if (!bUnityMode && static_cast<MenuBar*>(mpVCLMenu.get())->IsDisplayable()) { DestroyMenuBarWidget(); CreateMenuBarWidget(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
