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

Harshitha Onkar honkar at openjdk.org
Sat Feb 8 01:27:18 UTC 2025


On Fri, 7 Feb 2025 06:52:48 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> I tested different ways to merge this block with the below blocks. I'm not sure if it makes sense to do so now because it wouldn't be as simple as adding `|| focusOwner == null` to the first if-statement or appending the logic to the `else` block. I would still need another if or else/if block regardless. And I think it's harder to follow than the current implementation. Let me know if you prefer it a different way, but I think the current implementation is better for now.
>
> I was thinking more of `if (!par.isEnabled() !! focusOwner == null)` as the parent is still JFrame.
> 
> But, I was trying to run the testcase mentioned in the JBS and this regression test but I am not able to reproduce without the fix..
> It doesn't keep on scrolling when it regains focus in my windows 11 machine..

@prsadhuk  I wasn't able to replicate the issue first few times. When I changed the no. of combobox items to 1000, the issue was reproducible. 

I think the issue with 100 combobox items is the end of combobox is reached quickly while trying to ALT +TAB at the same time and it becomes difficult to replicate the issue unless it is done quickly.

@DamonGuy Maybe it is good to increase the no. of combobox items to reproduce the issue more consistently.

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

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


More information about the client-libs-dev mailing list