On Thu, 9 May 2024 17:47:03 GMT, Phil Race <[email protected]> wrote: >> Abhishek Kumar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Var moved to local scope > > src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java > line 668: > >> 666: KeyboardFocusManager.getCurrentKeyboardFocusManager(). >> 667: addPropertyChangeListener(_handler); >> 668: if (UIManager.getLookAndFeel().getName().contains("GTK")) { > > This doesn't seem like an ideal way of doing this. > I don't see any precedent for this approach in the Swing implementation. > > We need some method that is more about the properties of a L&F rather than > keying off name. > > Please look around at LookAndFeel and UIDefaults (etc) for a place you could > store a property that tells you what to do. > Or perhaps you this "altProcessor" would be the value you retrieve and if it > is non-null you install it. > Or perhaps this should be pushed down to the GTK L&F > > I don't know what the right answer is, I just don't think this approach is it.
@prrace Added the property to handle ALT key press specific to GTK L&F. Based on the property value the event handler for ALT key press is installed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18992#discussion_r1602065156
