vcl/osx/salmenu.cxx | 6 ++++++ 1 file changed, 6 insertions(+) New commits: commit 6079df3e7f86270aad9d4a6ce811366f280fa762 Author: Patrick Luby <guibmac...@gmail.com> AuthorDate: Wed Jul 10 08:27:01 2024 -0400 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Mon Jul 15 10:31:40 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/+/170296 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> 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) ) {