JDK-8228638 : Replacement for com.apple.eawt.FullScreen*
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 11,12,13,14
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: os_x
  • CPU: x86
  • Submitted: 2019-07-24
  • Updated: 2024-08-13
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
If I understand correctly from reading JDK-8048731 and JDK-8143914, the latter was supposed to allow macOS "native" full-screen mode to be activated by calling setExtendedState(MAXIMIZED_BOTH), exposing similar functionality to the now-deprecated com.apple.eawt.Application.requestToggleFullScreen() method.  However, I was never able to make it work, and in looking at the JDK code, I don't see how it can possibly work.  The com.apple.eawt.Application.requestToggleFullScreen() method hooks into PlatformWindow.toggleFullScreen().  The new code implemented in JDK-8143914 provides additional hooks into CPlatformWindow.toggleFullScreen(), but they appear to be activated only if:

1. getRootPane().putClientProperty("apple.awt.fullscreenable", false) is called and the window is already in full-screen mode, or

2. setResizable(false) is called and the window is already in full-screen mode.

That does not expose the same functionality to applications as com.apple.eawt.Application.requestToggleFullScreen().  Even if it did, it could not replace com.apple.eawt.FullScreenListener, which is needed in order for applications to be notified when full-screen mode is activated or deactivated.



Comments
Initially reported here: http://mail.openjdk.java.net/pipermail/awt-dev/2019-July/015315.html
26-07-2019

Enhancement request w.r.t fix in JDK-8143914
26-07-2019