[jdk8u-dev] RFR: 8194873: right ALT key hotkeys no longer work in Swing components [v4]

Anton Litvinov alitvinov at openjdk.java.net
Mon May 30 17:27:45 UTC 2022


On Sat, 28 May 2022 00:22:03 GMT, Olga Mikhaltsova <omikhaltcova at openjdk.org> wrote:

>> I'd like to backport JDK-8194873 to jdk8u. The same issue is observed there.
>> The original patch for JDK-8194873 applied not cleanly due to 2 files:   
>>>  MotifLookAndFeel.java - differences in the header and in the context;
>>>  SwingUtilities2.java - difference in the context.
>> 
>> The backport for JDK-8155742
>> 
>> 8155742: [Windows] robot.keyPress(KeyEvent.VK_ALT_GRAPH) throws java.lang.IllegalArgumentException in windows
>> 
>> was included as a part of this patch due to dependency on it of the regression test "jdk/test/javax/swing/event/RightAltKeyTest.java" included into the patch for JDK-8194873 (this test fails without the patch for JDK-8155742 as was pointed out below by Anton Litvinov).
>> The original patch For JDK-8155742 applied not cleanly due to 1 file:
>>> AltGraphModifierTest.java - differences in the header and slight in the context.
>> 
>> Tested on Windows. All regular tests passed.
>
> Olga Mikhaltsova has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Backport 08482543b496efa11dc8084a14a831799de60a93

No problem. If backports of the involved 2 bugs were clean, then it would make sense to accomplish them through 2 separate PRs in order to not involve anybody in their review, but in your case your backport has insignificant differences between it and the original fixes, as you wrote "difference in the context", therefore it will be required to get approval from the code reviewer for each of these possible PRs. Regarding the current PR, from my point of view it is also correct to combine backports of 2 bugs in one fix, because otherwise the test "RightAltKeyTest.java" will be failing.

Before pushing this change as is or under separate PRs, I would also recommend to look more carefully on 2 regression tests modified by the fix JDK-8155742: "ModifierRobotKeyTest.java", "AltGraphModifierTest.java". Make sure that they pass on the supported OS versions, not only on MS Windows OS. And, if they fail, and you decide to start porting other fixes, which could be connected to "AltGraphModifierTest.java" through the source code and which are specific to macOS and to keyboard events, I do not recommend even to touch these macOS specific fixes, it will be a chain of more than 10 fixes connected with each other as a regression of a fix for regression and in the end there will be couple of regressions still unresolved, so do not port those fixes specific to keyboard events on macOS. I personally did not port them for that reason.

-------------

PR: https://git.openjdk.java.net/jdk8u-dev/pull/60


More information about the jdk8u-dev mailing list