On Thu, 24 Nov 2022 08:57:45 GMT, Abhishek Kumar <abhis...@openjdk.org> wrote:

>> The Backspace key doesn't lead to parent directory of current directory for 
>> JFileChooser in GTK LAF. 
>> Added the lazy input value in `GTKLookandFeel` and fix is working fine.
>> 
>> Implemented a manual test to check BackSpace behavior for all installed LAF 
>> in Linux platform.
>> The test mentioned in 
>> [JDK-8078471](https://bugs.openjdk.org/browse/JDK-8078471) 
>> `javax/swing/JFileChooser/4150029/bug4150029.html` also working fine with 
>> GTK option (-client 
>> -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel).
>
> Abhishek Kumar has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Backspace at root level handled

I wonder how it works in Nimbus as this mapping is not there in 
Synth/NimbusLookAndFeel and still it works and both GTK/Nimbus extends Synth. 
Can you please check?

> If JFileChooser current directory is set to root directory then pressing 
> BackSpace key changes to user's home directory in GTK LAF which is incorrect. 
> It should remain at root directory.

You have a similar fix for GTK 
https://github.com/openjdk/jdk/commit/9d0009e92b790b43153e3db353db775e6ff731cb 
Can it be  reused in this case also?

Also, is it not possible to create automated test, like calling 
JFileChooser.getCurrentDirectory() and fail if it's not the parent directory 
(or if it still remains in present directory) after BACKSPACE is pressed?

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

PR: https://git.openjdk.org/jdk/pull/11291

Reply via email to