summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-07-10 08:27:01 -0400
committerMichael Stahl <michael.stahl@allotropia.de>2024-07-11 10:58:51 +0200
commit2a7441a00155ce46977fbd0779590e12a5cfd944 (patch)
treef95043273b80683c6b6d07d01ca36e911f9cd41f /vcl
parent10f148206f0e352e73361d6a81670ac2eaabb73c (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 (cherry picked from commit 8e8036491ff0a6c2df2075af66609df17ee594cd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170297 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/osx/salmenu.cxx6
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) )
{