8002114: fix failed for JDK-7160951: [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar
authorleonidr
Fri, 02 Nov 2012 19:47:12 +0400
changeset 14312 310bfcd9c932
parent 14311 b2492ea8d08e
child 14313 4a3ba762d989
8002114: fix failed for JDK-7160951: [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar Reviewed-by: serb
jdk/src/macosx/native/sun/awt/CMenuItem.m
--- a/jdk/src/macosx/native/sun/awt/CMenuItem.m	Fri Nov 02 19:20:03 2012 +0400
+++ b/jdk/src/macosx/native/sun/awt/CMenuItem.m	Fri Nov 02 19:47:12 2012 +0400
@@ -76,7 +76,7 @@
     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;
         }