提交 ba82e74f 编写于 作者: L leonidr

8002114: fix failed for JDK-7160951: [macosx] ActionListener called twice for...

8002114: fix failed for JDK-7160951: [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar
Reviewed-by: serb
上级 3701b59d
...@@ -76,7 +76,7 @@ JNF_COCOA_ENTER(env); ...@@ -76,7 +76,7 @@ JNF_COCOA_ENTER(env);
NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent]; NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
if ([currEvent type] == NSKeyDown) { if ([currEvent type] == NSKeyDown) {
NSString *menuKey = [sender keyEquivalent]; NSString *menuKey = [sender keyEquivalent];
NSString *eventKey = [currEvent characters]; NSString *eventKey = [currEvent charactersIgnoringModifiers];
if ([menuKey isEqualToString:eventKey]) { if ([menuKey isEqualToString:eventKey]) {
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册