Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8263169: [macos] JavaFX windows open as tabs when system preference for documents is set #440

Closed

Conversation

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Mar 24, 2021

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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8263169: [macos] JavaFX windows open as tabs when system preference for documents is set

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/440/head:pull/440
$ git checkout pull/440

Update a local copy of the PR:
$ git checkout pull/440
$ git pull https://git.openjdk.java.net/jfx pull/440/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 440

View PR using the GUI difftool:
$ git pr show -t 440

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/440.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Mar 24, 2021

👋 Welcome back kcr! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Mar 24, 2021
@kevinrushforth
Copy link
Member Author

@kevinrushforth kevinrushforth commented Mar 24, 2021

/reviewers 2

@openjdk
Copy link

@openjdk openjdk bot commented Mar 24, 2021

@kevinrushforth
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

@mlbridge
Copy link

@mlbridge mlbridge bot commented Mar 24, 2021

Webrevs

@aghaisas
Copy link
Collaborator

@aghaisas aghaisas commented Apr 5, 2021

I tested on macOS 10.15.7.
With suggested system setting set, the test fails without fix and passes with it.

@openjdk
Copy link

@openjdk openjdk bot commented Apr 6, 2021

@kevinrushforth This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8263169: [macos] JavaFX windows open as tabs when system preference for documents is set

Reviewed-by: aghaisas, pbansal

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 8 new commits pushed to the master branch:

  • e63931e: 8262366: Update glib to version 2.66.7
  • b2f842d: 8259555: Webkit crashes on Apple Silicon
  • 052e9f7: 8258381: [macos] Exception when input emoji using Chinese input method
  • 015dad0: 8264330: Scene MouseHandler is referencing removed nodes
  • eec2f39: 8264536: Building OpenJFX on Apple AARCH64 not possible
  • f3e27a0: 8264162: PickResult.toString() is missing the closing square bracket
  • d80b8ad: 8264501: UIWebView for iOS is deprecated
  • ed5cfe7: 8211362: Restrict export of libjpeg symbols from libjavafx_iio.so

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Apr 6, 2021
@kevinrushforth
Copy link
Member Author

@kevinrushforth kevinrushforth commented Apr 6, 2021

/integrate

@openjdk openjdk bot closed this Apr 6, 2021
@openjdk openjdk bot added integrated and removed ready labels Apr 6, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 6, 2021

@kevinrushforth Since your change was applied there have been 8 commits pushed to the master branch:

  • e63931e: 8262366: Update glib to version 2.66.7
  • b2f842d: 8259555: Webkit crashes on Apple Silicon
  • 052e9f7: 8258381: [macos] Exception when input emoji using Chinese input method
  • 015dad0: 8264330: Scene MouseHandler is referencing removed nodes
  • eec2f39: 8264536: Building OpenJFX on Apple AARCH64 not possible
  • f3e27a0: 8264162: PickResult.toString() is missing the closing square bracket
  • d80b8ad: 8264501: UIWebView for iOS is deprecated
  • ed5cfe7: 8211362: Restrict export of libjpeg symbols from libjavafx_iio.so

Your commit was automatically rebased without conflicts.

Pushed as commit 5898858.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@openjdk openjdk bot removed the rfr label Apr 6, 2021
@kevinrushforth kevinrushforth deleted the 8263169-tabbing branch Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants