vcl/osx/salmenu.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 8e8036491ff0a6c2df2075af66609df17ee594cd
Author: Patrick Luby <[email protected]>
AuthorDate: Wed Jul 10 08:27:01 2024 -0400
Commit: Patrick Luby <[email protected]>
CommitDate: Wed Jul 10 18:38:44 2024 +0200
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 <[email protected]>
Tested-by: Jenkins
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) )
{