aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nsmenu.m21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 20b4e58b479..604adcf40b5 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -643,14 +643,23 @@ x_activate_menubar (struct frame *f)
643 643
644 keyEq = [self parseKeyEquiv: wv->key]; 644 keyEq = [self parseKeyEquiv: wv->key];
645#ifdef NS_IMPL_COCOA 645#ifdef NS_IMPL_COCOA
646 /* macOS just ignores modifier strings longer than one character */ 646 /* macOS mangles modifier strings longer than one character. */
647 if (keyEquivModMask == 0) 647 if (keyEquivModMask == 0)
648 title = [title stringByAppendingFormat: @" (%@)", keyEq]; 648 {
649 title = [title stringByAppendingFormat: @" (%@)", keyEq];
650 item = [self addItemWithTitle: (NSString *)title
651 action: @selector (menuDown:)
652 keyEquivalent: @""];
653 }
654 else
655 {
656#endif
657 item = [self addItemWithTitle: (NSString *)title
658 action: @selector (menuDown:)
659 keyEquivalent: keyEq];
660#ifdef NS_IMPL_COCOA
661 }
649#endif 662#endif
650
651 item = [self addItemWithTitle: (NSString *)title
652 action: @selector (menuDown:)
653 keyEquivalent: keyEq];
654 [item setKeyEquivalentModifierMask: keyEquivModMask]; 663 [item setKeyEquivalentModifierMask: keyEquivModMask];
655 664
656 [item setEnabled: wv->enabled]; 665 [item setEnabled: wv->enabled];