RFR: 8155030: The Menu Mnemonics are always displayed for GTK LAF [v9]

Abhishek Kumar abhiscxk at openjdk.org
Fri Jun 28 10:52:21 UTC 2024


On Thu, 27 Jun 2024 17:17:12 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Abhishek Kumar has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Mnemonic handler class
>>  - Mnemonic handler added and previous implementation revert back
>
> I think we're moving in the right direction.
> 
> My idea was to extract the common functionality as the methods `setMnemonicHidden`, `isMnemonicHidden` and `repaintMnemonicsInWindow`, `repaintMnemonicsInContainer` into a helper class.
> 
> `AltProcessor`… Your version for GTK and the version in Aqua look the same to me. I think it makes sense to create a common `AltProcessor` class which would be used by GTK and Aqua.
> 
> The Windows version is different, so it'll stay this way… It doesn't look worth trying to fit that version into a shared class.

@aivanov-jdk I have updated the PR to have a common AltProcessor class to handle Alt key press for GTK and Aqua. Helper methods are now part of MnemonicHandler class and due to that there are number of files related to Windows and Aqua implementation got changed. Test program is extended to verify the behavior for Aqua L&F as well.

Currently WIndowsLookAndFeel class still contains the `setMnemonicHidden` and `isMnemonicHidden` APIs which should be removed but I am not sure if they can directly be removed or first it should be marked as deprecated ?
same confusion for AquaMnemonicHandler class as well which is unused now.

CI testing is in progress to confirm if there is any regression.

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

PR Comment: https://git.openjdk.org/jdk/pull/18992#issuecomment-2196623255


More information about the client-libs-dev mailing list