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
8248490: [macOS] Undecorated stage does not minimize #264
8248490: [macOS] Undecorated stage does not minimize #264
Conversation
👋 Welcome back kcr! A progress list of the required criteria for merging this PR into |
/reviewers 2 |
@kevinrushforth |
On a related note, even after this fix, an undecorated window cannot be restored (deminiaturized) programmatically. This is not related and is not a regression. I filed JDK-8249202 to track this as a follow-up issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix and test both look good to me. Confirmed that test fails before and passes after the fix.
At current stage of jfx15, approach of safe fix seems preferable over always setting the the style.
Just a small query, will we fix this differently in main line ?
@kevinrushforth This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 15 commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge ➡️ To integrate this PR with the above commit message to the |
No, I wasn't planning to revisit this. At least not until looking at the (P4) follow-up issue, JDK-8249202. |
Sounds good to me, we can address these together. |
/integrate |
@kevinrushforth The following commits have been pushed to jfx15 since your change was applied:
Your commit was automatically rebased without conflicts. Pushed as commit 2f4666a. |
When running a JavaFX application on macOS using a JDK compiled with the MacOSX 10.13 SDK or later, an undecorated or transparent stage cannot be programmatically minimized (iconified). The reason for this failure is that JavaFX only sets the
NSMiniaturizableWindowMask
bit in thestyleMask
of theNSWindow
for decorated windows. Previous versions of the MacOSX SDK would minimize and restore a windows regardless of the setting of this flag. When the application is compiled against a newer SDK, Apple honors that flag and prevents the window from being minimized.Note that it is the version of the SDK used to compile the JDK and not the version that is used to compile JavaFX that exposes this bug.
The fix is to temporarily set the
NSMiniaturizableWindowMask
prior to callingminiaturize
ordeminiaturize
, and restore it afterwards. This seems safer than setting the bit unconditionally when the NSWindow is created, which would have been another approach.A similar fix was done for AWT. See JDK-8214046.
I propose to fix this in JavaFX 15, so it it targeted to the
jfx15
branch.Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/264/head:pull/264
$ git checkout pull/264