On Thu, 6 Feb 2025 17:13:00 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java 
>> line 1625:
>> 
>>> 1623:                     scrollbar.setValueIsAdjusting(false);
>>> 1624:                     return;
>>> 1625:                 }
>> 
>> Can't it be merged with below frame disable logic as it does the same thing?
>
> I initially separated it to make it clear that this is for focus. I'll edit 
> this and modify the existing comment to include null focus.

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.

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

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

Reply via email to