diff options
author | Patrick Luby <guibmacdev@gmail.com> | 2024-07-10 08:27:01 -0400 |
---|---|---|
committer | Patrick Luby <guibomacdev@gmail.com> | 2024-07-10 18:38:44 +0200 |
commit | 8e8036491ff0a6c2df2075af66609df17ee594cd (patch) | |
tree | 5a64ad2a91859395da575ec52dc401f500433ad7 | |
parent | 4241f171ad3deb1d272dba12acde50011dd90c3c (diff) |
tdf#160427 native menu changes can only be done on the main thread
Change-Id: I7dbe9913eaa087e143acb95bdae625c69888c3dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170308
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Jenkins
-rw-r--r-- | vcl/osx/salmenu.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx index 800affc060ef..dcac168f7e53 100644 --- a/vcl/osx/salmenu.cxx +++ b/vcl/osx/salmenu.cxx @@ -385,6 +385,9 @@ void AquaSalMenu::setMainMenu() void AquaSalMenu::setDefaultMenu() { + // tdf#160427 native menu changes can only be done on the main thread + OSX_SALDATA_RUNINMAIN(AquaSalMenu::setDefaultMenu()) + NSMenu* pMenu = [NSApp mainMenu]; unsetMainMenu(); @@ -498,6 +501,9 @@ void AquaSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) void AquaSalMenu::RemoveItem( unsigned nPos ) { + // tdf#160427 native menu changes can only be done on the main thread + OSX_SALDATA_RUNINMAIN(RemoveItem(nPos)) + AquaSalMenuItem* pRemoveItem = nullptr; if( nPos == MENU_APPEND || nPos == (maItems.size()-1) ) { |