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.

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

Commit messages:
 - 8263169: [macos] With changed system preference JavaFX window will open as 
tabs

Changes: https://git.openjdk.java.net/jfx/pull/440/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=440&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263169
  Stats: 174 lines in 2 files changed: 174 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jfx/pull/440.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/440/head:pull/440

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

Reply via email to