vcl/osx/salmenu.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 2a7441a00155ce46977fbd0779590e12a5cfd944
Author:     Patrick Luby <guibmac...@gmail.com>
AuthorDate: Wed Jul 10 08:27:01 2024 -0400
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Thu Jul 11 10:58:51 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 <guibomac...@gmail.com>
    Tested-by: Jenkins
    (cherry picked from commit 8e8036491ff0a6c2df2075af66609df17ee594cd)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170297
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

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) )
     {

Reply via email to