RFR: 8326458: Menu mnemonic doesn't toggle between show and hide in Windows LAF when F10 is pressed. [v3]
Alexey Ivanov
aivanov at openjdk.org
Thu Feb 29 11:05:52 UTC 2024
On Thu, 29 Feb 2024 07:48:09 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> Menu mnemonic doesn't toggle between show and hide state when F10 is pressed. Behavior is not similar to windows native application. Fix is to ensure that menu mnemonic state toggles between show and hide.
>>
>> Can be verified with SwingSet2 application.
>> CI tests are green with the fix. Link posted in JBS.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> Review comment update
Changes requested by aivanov (Reviewer).
src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuBarUI.java line 152:
> 150: //MenuElement[] path = new MenuElement[2];
> 151: //path[0] = (MenuElement)menuBar;
> 152: //path[1] = (MenuElement)menu;
Do not leave commented out code. The source control system is used to record the history.
If you want to keep the old way, you can still do it by replacing one line
MenuElement[] path = {menuBar, menu};
inside `else` with these three lines.
-------------
PR Review: https://git.openjdk.org/jdk/pull/17961#pullrequestreview-1908582516
PR Review Comment: https://git.openjdk.org/jdk/pull/17961#discussion_r1507399308
More information about the client-libs-dev
mailing list