<AWT Dev>  RFR 8187635: On Windows Swing changes keyboard layout on a window activation
semyon.sadetsky at oracle.com
Wed Feb 28 20:20:50 UTC 2018
On 02/28/2018 12:13 PM, Dmitry Markov wrote:
> Thank you, Sergey!
> Looking for the second +1 from someone else.
> Thanks in advance,
>> On 26 Feb 2018, at 22:43, Sergey Bylokhov <sergey.bylokhov at oracle.com> wrote:
>> Looks fine.
>> On 26/02/2018 04:55, Dmitry Markov wrote:
>>> 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.
>>> It is necessary to set the flag g_bUserHasChangedInputLang during processing of WM_INPUTLANGCHANGE to block execution of activateKeyboardLayout() from AwtToolkit.WndProc().
>>> I ran related AWT/Swing regression tests and did not observe any new failures.
>> Best regards, Sergey.
More information about the awt-dev