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

Abhishek Kumar abhiscxk at openjdk.org
Wed May 8 08:30:55 UTC 2024


On Wed, 8 May 2024 06:56:40 GMT, Tejesh R <tr at openjdk.org> wrote:

> `postProcessKeyEvent(KeyEvent ev)` method from `AquaMnemonicHandler` class is reused instead of `WindowsRootPaneUI` class, any reason for that? (Since I see some differences in the way they are processing the event).

In Windows, the behavior is different on press of ALT key to toggle the mnemonics. Please refer this https://github.com/openjdk/jdk/pull/17961#issuecomment-1965074756 where it is mentioned that `the first press of Alt activates the menu bar and displays the mnemonics, the second press of Alt key returns the focus to the component which had the focus before Alt was pressed for the first time and removes the mnemonics from the menu bar.` Screenshot on Win10 can be refer here https://github.com/openjdk/jdk/pull/17961#pullrequestreview-1906613974.

But in Linux I can't see that the "first press of ALT activates the menu bar and the second press of Alt key returns the focus to the component which had the focus before Alt key was pressed for first time".

So, the method `postProcessKeyEvent(KeyEvent ev)` is different in linux compare to windows machine.

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

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


More information about the client-libs-dev mailing list