RFR: 8344981: [REDO] JDK-6672644 JComboBox still scrolling if switch to another window and return back [v3]

Harshitha Onkar honkar at openjdk.org
Fri Feb 14 19:40:16 UTC 2025


On Tue, 11 Feb 2025 19:10:55 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java line 1620:
>> 
>>> 1618:             do {
>>> 1619:                 // If application isn't in focus, stop the timer
>>> 1620:                 if (focusOwner == null) {
>> 
>> if (!scrollbar.isShowing()) {
>>           ((Timer)e.getSource()).stop();
>>           buttonListener.handledEvent = false;
>>           scrollbar.setValueIsAdjusting(false);
>>           return;
>>       }
>> 
>> 
>> I haven't tested this solution well, but you can try to stop the timer when the scrollbar is not showing(before entering the `do` loop)
>
> Tested this solution locally and in CI. Seems to work well. Clientlibs passes and the updated, automatic test also passes on all related platforms. Updated the PR. Thanks for providing the automated test and suggested change.

@DamonGuy Probably a good idea to add @azvegint as co-author to give credit for the fix and automated test suggestions.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23451#discussion_r1956633741


More information about the client-libs-dev mailing list