On Fri, 10 Jul 2020 18:23:58 GMT, Kevin Rushforth <[email protected]> wrote:

> 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 the `styleMask` of the 
> `NSWindow` 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 
> calling `miniaturize` or `deminiaturize`, 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](https://bugs.openjdk.java.net/browse/JDK-8214046).  I propose 
> to fix this in JavaFX 15, so it it targeted
> to the `jfx15` branch.

This pull request has now been integrated.

Changeset: 2f4666a7
Author:    Kevin Rushforth <[email protected]>
URL:       https://git.openjdk.java.net/jfx/commit/2f4666a7
Stats:     135 lines in 2 files changed: 0 ins; 134 del; 1 mod

8248490: [macOS] Undecorated stage does not minimize

Reviewed-by: arapte, aghaisas

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

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

Reply via email to