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

2024-06-27 Thread Abhishek Kumar
On Tue, 25 Jun 2024 15:47:49 GMT, Alexey Ivanov wrote: >> Abhishek Kumar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove access modifier from method declaration > > Changes requested by aivanov (Reviewer). @aivanov-jdk Updated

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

2024-06-27 Thread Abhishek Kumar
On Tue, 25 Jun 2024 15:35:47 GMT, Alexey Ivanov wrote: >> Abhishek Kumar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove access modifier from method declaration > >

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

2024-06-26 Thread Alexey Ivanov
On Wed, 26 Jun 2024 08:40:24 GMT, Abhishek Kumar wrote: >> Thank you for looking into it. A `MnemonicHandler` class in `sun.swing` or >> `sun.swing.plaf` package could be a good candidate. The `sun.swing` package >> contains a lot of support classes for Swing, including `SwingUtilities2` and

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

2024-06-26 Thread Abhishek Kumar
On Tue, 25 Jun 2024 15:11:31 GMT, Alexey Ivanov wrote: >> I will check and update if it is possible. > > Thank you for looking into it. A `MnemonicHandler` class in `sun.swing` or > `sun.swing.plaf` package could be a good candidate. The `sun.swing` package > contains a lot of support classes

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

2024-06-25 Thread Alexey Ivanov
On Fri, 21 Jun 2024 07:55:24 GMT, Abhishek Kumar wrote: >> In GTK LAF, the menu mnemonics are always displayed which is different from >> the native behavior. In native application **(tested with gedit for normal >> buttons and tested with libreoffice for menu**), the menu mnemonics toggle >>

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

2024-06-25 Thread Alexey Ivanov
On Tue, 25 Jun 2024 15:18:29 GMT, Alexey Ivanov wrote: >>> In my initial fix, I added the `altProcessor` handler in >>> `SynthLookAndFeel.initialize` with condition check for GTK L Phil has >>> suggested not to check for GTK L instead look for some alternate way like >>> mentioned >>>

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

2024-06-25 Thread Alexey Ivanov
On Tue, 25 Jun 2024 14:58:53 GMT, Alexey Ivanov wrote: >>> If RootPane.altPress can be changed dynamically, you can install a >>> PropertyChangeListener to UIManager. >> >> I think it can be changed but is it really required to handle it ? >> I mean why does a user change it dynamically ? > >>

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

2024-06-25 Thread Alexey Ivanov
On Mon, 24 Jun 2024 07:20:24 GMT, Abhishek Kumar wrote: >> src/java.desktop/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java >> line 751: >> >>> 749: * Repaints all the components with the mnemonics in the given >>> window and all its owned windows. >>> 750: */ >>> 751:

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

2024-06-25 Thread Alexey Ivanov
On Mon, 24 Jun 2024 07:21:49 GMT, Abhishek Kumar wrote: >>>Requesting the value of RootPane.altPress from UIManager each time >>>postProcessKeyEvent is called is inefficient, so you can store the value in >>>altProcessor when look and feel is installed. >> >> I guess you are pointing out the

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

2024-06-25 Thread Alexey Ivanov
On Mon, 24 Jun 2024 07:19:49 GMT, Abhishek Kumar wrote: > Should I revert it back to javadoc style comment ? Absolutely! - PR Review Comment: https://git.openjdk.org/jdk/pull/18992#discussion_r1652814116

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

2024-06-24 Thread Abhishek Kumar
On Mon, 24 Jun 2024 07:17:19 GMT, Abhishek Kumar wrote: >>> Wouldn't it be easier to install altProcessor always in >>> SynthLookAndFeel.initialize and to uninstall it in >>> SynthLookAndFeel.uninitialize like it's done in WindowsLookAndFeel: >>

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

2024-06-24 Thread Abhishek Kumar
On Mon, 24 Jun 2024 06:21:51 GMT, Abhishek Kumar wrote: >> src/java.desktop/share/classes/javax/swing/plaf/synth/SynthRootPaneUI.java >> line 45: >> >>> 43: private SynthStyle style; >>> 44: static final AltProcessor altProcessor = new AltProcessor(); >>> 45: static boolean

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

2024-06-24 Thread Abhishek Kumar
On Fri, 21 Jun 2024 20:14:28 GMT, Alexey Ivanov wrote: >> Abhishek Kumar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove access modifier from method declaration > >

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

2024-06-24 Thread Abhishek Kumar
On Fri, 21 Jun 2024 20:08:58 GMT, Alexey Ivanov wrote: > Wouldn't it be easier to install altProcessor always in > SynthLookAndFeel.initialize and to uninstall it in > SynthLookAndFeel.uninitialize like it's done in WindowsLookAndFeel:

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

2024-06-21 Thread Alexey Ivanov
On Fri, 21 Jun 2024 07:55:24 GMT, Abhishek Kumar wrote: >> In GTK LAF, the menu mnemonics are always displayed which is different from >> the native behavior. In native application **(tested with gedit for normal >> buttons and tested with libreoffice for menu**), the menu mnemonics toggle >>

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

2024-06-21 Thread Abhishek Kumar
> In GTK LAF, the menu mnemonics are always displayed which is different from > the native behavior. In native application **(tested with gedit for normal > buttons and tested with libreoffice for menu**), the menu mnemonics toggle on > press of `ALT` key. Menu mnemonics are hidden initially