summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/inc/unx/gtk/gtksalmenu.hxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtksalmenu.cxx22
2 files changed, 12 insertions, 12 deletions
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index d9aa403de9bd..d4857fe7e87a 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -112,7 +112,7 @@ public:
bool PrepUpdate();
virtual void Update() override; // Update this menu only.
// Update full menu hierarchy from this menu.
- void UpdateFull () { ActivateAllSubmenus(mpVCLMenu); Update(); }
+ void UpdateFull () { ActivateAllSubmenus(mpVCLMenu); }
// Clear ActionGroup and MenuModel from full menu hierarchy
void ClearActionGroupAndMenuModel();
GtkSalMenu* GetTopLevel();
diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index 195e8ce071d2..72ad6e40d6bd 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -1205,23 +1205,23 @@ void GtkSalMenu::DispatchCommand(const gchar *pCommand)
void GtkSalMenu::ActivateAllSubmenus(Menu* pMenuBar)
{
- for (GtkSalMenuItem* pSalItem : maItems)
+ // We can re-enter this method via the new event loop that gets created
+ // in GtkClipboardTransferable::getTransferDataFlavorsAsVector, so use the InActivateCallback
+ // flag to detect that and skip some startup work.
+ if (!mbInActivateCallback)
{
- if ( pSalItem->mpSubMenu != nullptr )
+ mbInActivateCallback = true;
+ pMenuBar->HandleMenuActivateEvent(GetMenu());
+ mbInActivateCallback = false;
+ for (GtkSalMenuItem* pSalItem : maItems)
{
- // We can re-enter this method via the new event loop that gets created
- // in GtkClipboardTransferable::getTransferDataFlavorsAsVector, so use the InActivateCallback
- // flag to detect that and skip some startup work.
- if (!pSalItem->mpSubMenu->mbInActivateCallback)
+ if ( pSalItem->mpSubMenu != nullptr )
{
- pSalItem->mpSubMenu->mbInActivateCallback = true;
- pMenuBar->HandleMenuActivateEvent(pSalItem->mpSubMenu->GetMenu());
- pSalItem->mpSubMenu->mbInActivateCallback = false;
pSalItem->mpSubMenu->ActivateAllSubmenus(pMenuBar);
- pSalItem->mpSubMenu->Update();
- pMenuBar->HandleMenuDeActivateEvent(pSalItem->mpSubMenu->GetMenu());
}
}
+ Update();
+ pMenuBar->HandleMenuDeActivateEvent(GetMenu());
}
}