Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Nohus opened this issue Jan 21, 2025 · 0 comments

Comments

@Nohus
Copy link

Nohus commented Jan 21, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant