RFR: 8284654: Modal behavior returns to wrong stage [v2]

Ambarish Rapte arapte at openjdk.java.net
Tue May 10 08:39:48 UTC 2022


On Mon, 9 May 2022 14:54:55 GMT, Thiago Milczarek Sayao <tsayao at openjdk.org> wrote:

>> When there's an APPLICATION_MODAL window, all other windows are disabled and re-enabled when the APPLICATION_MODAL window closes. This causes `requestToFront()` to be called on every window, and it does not guarantee order.
>> 
>> The fix also works for:
>> https://bugs.openjdk.java.net/browse/JDK-8269429
>> 
>> But this one might need another fix:
>> https://bugs.openjdk.java.net/browse/JDK-8240640
>
> Thiago Milczarek Sayao has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Set the focus on the latest window when re-enabling them

The original fix gets affected by the new commit.
Now, after closing dialog the focus always returns only to the stage that was created later.

1. Run the sample attached to [JDK-8284654](https://bugs.openjdk.java.net/browse/JDK-8284654).
2. Click button One and Two both once in order
3. Re-arrange both the windows such that they are visible.
4. Click the button "Click here" in Window One: Error dialog will be displayed
5. Close the Error dialog
=> Window Two gets focused but Window One should gets focused.
=> This worked correctly before the latest commit.

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

PR: https://git.openjdk.java.net/jfx/pull/784


More information about the openjfx-dev mailing list