On Thu, 6 Feb 2025 17:28:59 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:
>> 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. 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.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23451#discussion_r1946037272