8002114: fix failed for JDK-7160951: [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar
authorleonidr
Mon Nov 19 12:12:47 2012 +0000 (6 months ago)
changeset 560221b753dd0fde
parent 5601af5b12bbe189
child 5603a91ac65b5e2f
8002114: fix failed for JDK-7160951: [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar
Reviewed-by: serb, anthony
src/macosx/native/sun/awt/CMenuItem.m
--- a/src/macosx/native/sun/awt/CMenuItem.m Wed Nov 14 17:56:28 2012 -0800
+++ b/src/macosx/native/sun/awt/CMenuItem.m Mon Nov 19 12:12:47 2012 +0000
@@ -76,7 +76,7 @@ JNF_COCOA_ENTER(env);
NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
if ([currEvent type] == NSKeyDown) {
NSString *menuKey = [sender keyEquivalent];
- NSString *eventKey = [currEvent characters];
+ NSString *eventKey = [currEvent charactersIgnoringModifiers];
if ([menuKey isEqualToString:eventKey]) {
return;
}