summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2018-02-08 01:47:46 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2018-02-08 14:42:00 +0100
commit9d77e7551e56b85d7f1b40bc42b9ba6876091f22 (patch)
tree7c84b8af89b974279da0c23f4822cdbd32e82604
parent9f36b8d0291ec7b2255c462947ca7f17beb3111b (diff)
tdf#100784 macOS: Don't attempt to handle shortcuts via the menubar
... when it's hidden. Change-Id: I7930afb8124dd552843512cd30bce4d82ade0c70 Reviewed-on: https://gerrit.libreoffice.org/49399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
-rw-r--r--vcl/osx/vclnsapp.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm
index 26f826467677..825edac6be6c 100644
--- a/vcl/osx/vclnsapp.mm
+++ b/vcl/osx/vclnsapp.mm
@@ -160,7 +160,8 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
// the main menu just beeps for an unknown or disabled key equivalent
// and swallows the event wholesale
NSMenu* pMainMenu = [NSApp mainMenu];
- if( ! bHandled && (pMainMenu == nullptr || ! [pMainMenu performKeyEquivalent: pEvent]) )
+ if( ! bHandled &&
+ (pMainMenu == nullptr || ! [NSMenu menuBarVisible] || ! [pMainMenu performKeyEquivalent: pEvent]) )
{
[[pKeyWin contentView] keyDown: pEvent];
bHandled = GetSalData()->maKeyEventAnswer[ pEvent ];