From e18697ccb29ab4fcf038ff204dc0e07dbcacca47 Mon Sep 17 00:00:00 2001 From: Manajit Halder Date: Tue, 6 Dec 2016 14:10:33 +0530 Subject: [PATCH] 8160536: [macosx] Possible regression: com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java Reviewed-by: serb, aniyogi --- .../native/libawt_lwawt/awt/CMenuItem.m | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CMenuItem.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CMenuItem.m index ac82ca85d5a..bcf7893005c 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CMenuItem.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CMenuItem.m @@ -115,19 +115,18 @@ if (keyWindow != nil) { return; } - } - else { - static JNF_CLASS_CACHE(jc_CMenuItem, "sun/lwawt/macosx/CMenuItem"); - static JNF_MEMBER_CACHE(jm_handleAction, jc_CMenuItem, "handleAction", "(JI)V"); // AWT_THREADING Safe (event) - - NSUInteger modifiers = [currEvent modifierFlags]; - jint javaModifiers = NsKeyModifiersToJavaModifiers(modifiers, NO); - - JNFCallVoidMethod(env, fPeer, jm_handleAction, UTC(currEvent), javaModifiers); // AWT_THREADING Safe (event) - } + } + + static JNF_CLASS_CACHE(jc_CMenuItem, "sun/lwawt/macosx/CMenuItem"); + static JNF_MEMBER_CACHE(jm_handleAction, jc_CMenuItem, "handleAction", "(JI)V"); // AWT_THREADING Safe (event) + + NSUInteger modifiers = [currEvent modifierFlags]; + jint javaModifiers = NsKeyModifiersToJavaModifiers(modifiers, NO); + + JNFCallVoidMethod(env, fPeer, jm_handleAction, UTC(currEvent), javaModifiers); // AWT_THREADING Safe (event) } JNF_COCOA_EXIT(env); - + } - (void) setJavaLabel:(NSString *)theLabel shortcut:(NSString *)theKeyEquivalent modifierMask:(jint)modifiers {