<AWT Dev> <AWT dev>[9] Review request for JDK-8156460 [macosx] Test case javax/swing/JPopupMenu/6827786/bug6827786.java fails

Sergey Malenkov malenkov at gmail.com
Thu Feb 28 17:35:36 UTC 2019


The following change fixes the critical problem for us, but I do not
like this solution.
I think that  leftAltKeyPressed  and  altGRPressed  should be more consistent.


Index: src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m
(revision 07bf36928d2435d60c4cf38ece9773e54a9f6cde)
+++ src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m (date
1551368901289)
@@ -746,6 +746,7 @@
                 *javaKeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_RIGHT;
             } else if (cur->nsMask == NSAlternateKeyMask) {
                 leftAltKeyPressed = NO;
+                altGRPressed = NO;
                 continue;
             }
             *javaKeyType = (cur->nsMask & nsFlags) ?



On Thu, Feb 28, 2019 at 8:12 PM Sergey Malenkov <malenkov at gmail.com> wrote:
>
> ATTENTION!
>
> This old fix breaks Java UI 11 on macOS Mojave.
> If you press RightAlt once, you never receive event with LeftAlt.
> Note that static altGRPressed = NO is switched to YES, but never to NO.
>
> Could you please improve your fix and add a test
> that Alt-events are not changed after pressing/releasing right Alt?
>
> Thanks,
> SAM
>
>
> --
> Best regards,
> Sergey A. Malenkov



-- 
Best regards,
Sergey A. Malenkov


More information about the awt-dev mailing list