RFR: 8263169: [macos] JavaFX windows open as tabs when system preference for documents is set
Ajit Ghaisas
aghaisas at openjdk.java.net
Mon Apr 5 11:43:42 UTC 2021
On Wed, 24 Mar 2021 13:38:27 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
> If the macOS system settings for opening documents as tabs is set to "Always", then all JavaFX windows, including Dialogs, are opened as tabs, unless they are child windows (that is, a Window with an owner).
>
> This is a real problem for certain types of dialogs, such as `APPLICATION_MODAL` dialogs, regardless of whether the app uses `show()` or uses `showAndWait()` to spin up a nested event loop. Also, if the dialog is of a different size that the main window, it will resize itself when switching tabs (which is visually jarring), and will not be sized correctly. Even for ordinary stages, this isn't the desired behavior.
>
> The fix is to disallow opening in tabs for all JavaFX windows. There are a couple existing tests that fail when the setting for opening documents in tabs is set to "Always", but I also added a new explicit test for this by creating two Stages and verifying that both are active at the same time.
Marked as reviewed by aghaisas (Reviewer).
I tested on macOS 10.15.7.
With suggested system setting set, the test fails without fix and passes with it.
-------------
PR: https://git.openjdk.java.net/jfx/pull/440
More information about the openjfx-dev
mailing list