From adb203bc05e3e36173cbd46b9951f79821a81799 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 11:27:54 +0200 Subject: Merging upstream version 4:24.2.1. Signed-off-by: Daniel Baumann --- toolkit/source/awt/vclxmenu.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'toolkit/source') diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 37785849c5..20d3d5d2d1 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -481,8 +481,13 @@ sal_Int16 VCLXMenu::execute( if ( !mpMenu || !IsPopupMenu() ) return 0; } + PopupMenu* pPopupMenu = static_cast(pMenu.get()); + MenuFlags nMenuFlags = pPopupMenu->GetMenuFlags(); + // #102790# context menus shall never show disabled entries + nMenuFlags |= MenuFlags::HideDisabledEntries; + pPopupMenu->SetMenuFlags(nMenuFlags); // cannot call this with mutex locked because it will call back into us - return static_cast(pMenu.get())->Execute( + return pPopupMenu->Execute( VCLUnoHelper::GetWindow( rxWindowPeer ), VCLRectangle( rPos ), static_cast(nFlags) | PopupMenuFlags::NoMouseUpClose ); -- cgit v1.2.3