<AWT Dev> [11] RFR 8187635: On Windows Swing changes keyboard layout on a window activation
Dmitry Markov
dmitry.markov at oracle.com
Mon Feb 26 12:55:13 UTC 2018
Hello,
Could you review a fix for jdk11, please?
bug: https://bugs.openjdk.java.net/browse/JDK-8187635
webrev: http://cr.openjdk.java.net/~dmarkov/8187635/webrev.00/
Problem description:
On Windows platform if AWT/Swing app is inactive (does not have focus) and user changes keyboard layout, the app window will receive the message WM_INPUTLANGCHANGE upon activation. During message processing we do NOT set the following flag g_bUserHasChangedInputLang. So the keyboard layout is switched back by AWT toolkit via WM_AWT_ACTIVATEKEYBOARDLAYOUT event.
Fix:
It is necessary to set the flag g_bUserHasChangedInputLang during processing of WM_INPUTLANGCHANGE to block execution of activateKeyboardLayout() from AwtToolkit.WndProc().
Testing:
I ran related AWT/Swing regression tests and did not observe any new failures.
Thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20180226/f9f43bc5/attachment.html>
More information about the awt-dev
mailing list