On Thu, 5 May 2022 13:46:56 GMT, Ambarish Rapte <ara...@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 > > This change fixes the exact issue that is reported in > [JDK-8284654](https://bugs.openjdk.java.net/browse/JDK-8284654). > and [JDK-8240640](https://bugs.openjdk.java.net/browse/JDK-8240640) does not > reproduce with this change. > > > But I observed another issue that occurs with this change. > Steps: > 1. Run the sample attached to > [JDK-8284654](https://bugs.openjdk.java.net/browse/JDK-8284654). > 2. Click button One and Two both once > 3. Re-arrange both the windows such that they are visible. > 4. Click the button "Click here" in Window Two: Error dialog will be displayed > 5. Click anywhere in Window One > 6. Close the Error dialog > => Observe that Window One gets the focus and not Window Two. > > I think the expected behavior here should be: After closing a dialog the > Focus should return to its parent window. @arapte I think it's another bug on Linux, as the window should not accept focus when disabled, so it should not reorder windows when you click it ("Window One" on step 5). Did you test it on Linux? ------------- PR: https://git.openjdk.java.net/jfx/pull/784