JDK-8211301 : [macos] support full window content options
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2018-10-01
  • Updated: 2021-04-15
  • Resolved: 2018-11-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12 JDK 8 Other
11.0.8-oracleFixed 12 b23Fixed 8u261Fixed openjdk8u292Fixed
Related Reports
CSR :  
Relates :  
A window on macOS can be configured so that the content view occupies the entire window, with the (translucent) title bar painted over it. In addition, the window can be configured so that the title bar uses a transparent background. This issue requests support for these options for Java windows on macOS.
Thanks, David!

This backport can cause issues when building OpenJDK8 using old versions of xcode: .../src/jdk/src/macosx/native/sun/awt/AWTWindow.m:1040:38: error: property 'frame' not found on object of type 'id' nsWindow.contentView.frame = contentFrame; This is caused because old versions of the AppKit define contentView in an NSWindow as type id instead of NSView: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-February/013401.html EDIT: Created JDK-8265238

Fix Request (OpenJDK 8u): Sponsored fix request comment on behalf of Andreas Ahlenstorf <andreas@ahlenstorf.ch>, who contributed the fix. The JDK 11u patch didn't apply cleanly and has been manually backported. The patch has been reviewed by Severin Gehwolf and seems low risk. It's also a Mac OS X only bugfix. Tested with AWT window jtreg tests on Mac by Andreas. I see Oracle backported this too. RFR: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-February/013395.html CSR (approved): https://bugs.openjdk.java.net/browse/JDK-8242566 I'll sponsor the push if this gets approved for 8u.

Just an additional remark: It would be even nicer, if there was a way to add an empty NSToolbar, as it centers the close/minimize/maximize buttons vertically with the toolbar and then allows the look that the current version of Safari features (v14). For illustrations of different window modes and how they depend on the presence of an NSToolbar object, please see https://github.com/lukakerr/NSWindowStyles

jdk11 backport request I would like to have the fix in open jdk11 as well, because the issue is present there too. The patch does not apply cleanly, a small adjustment needs to be made to AWTWindow.m . Review to be posted. RFR for the backport : https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-April/003032.html

Backport is a prerequisite to JDK-8231438