JetBrainsRuntime icon indicating copy to clipboard operation
JetBrainsRuntime copied to clipboard

Non-focused windows reported as having focus when toggling alwaysOnTop property

Open Nohus opened this issue 11 months ago • 1 comments

Originally reported in the Compose Multiplatform bug tracker, but turns out this is a JVM bug: https://youtrack.jetbrains.com/issue/CMP-7434/LocalWindowInfo.current.isWindowFocused-reports-true-for-not-focused-windows

On Windows, when a non-focused window has it's alwaysOnTop property changed, either from false to true, or true to false, Swing starts to report it as having focus, and windowGainedFocus fires. The window does not actually get focused (which is correct), it's just wrongly reported as having focus, and is stuck in this state until it actually gets focused.

See the linked bug for reproducer samples.

Nohus avatar Jan 21 '25 17:01 Nohus

@Nohus Can i work on this issue?

Sambit003 avatar May 16 '25 16:05 Sambit003