RFR: 8359899: Stage.isFocused() returns invalid value when Stage fails to receive focus
Lukasz Kostyra
lkostyra at openjdk.org
Tue Oct 28 11:26:19 UTC 2025
On Thu, 18 Sep 2025 15:47:03 GMT, Martin Fox <mfox at openjdk.org> wrote:
> The call to SetForegroundWindow fails but not before activating the window. Since it’s not the foreground window this PR correctly sets the JavaFX focused property back to false. But when I later click on the title bar to bring the window to the foreground the focused property is not updated.
I played around with this for a bit and I cannot reproduce this behavior. When I start the app it gets brought to foreground and stage.isFocused() returns true as it should for me.
Could it be the difference between Windows versions maybe? I'm running Win 11 24H2 at this point in time.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1849#issuecomment-3455972567
More information about the openjfx-dev
mailing list