JDK-8267238 : [macos] Java frame and dialog presented full screen freeze application
  • Type: CSR
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 17
  • Submitted: 2021-05-17
  • Updated: 2021-06-04
  • Resolved: 2021-06-04
Related Reports
CSR :  
Description
Summary
-------

Define a new implementation system property "jdk.allowMacOSTabbedWindows" which allows
users to over-ride the default JDK behaviour of disabling these

Problem
-------

macOS provides a System Setting "Prefer tabbed windows" which forces all top-level windows of an application to open
as a tab of a single top-level window. This does not work well with most Java applications and
can even cause them to freeze. Consquently JDK over-rides this System Setting to disable
tabbed windows. But some applications may want to use this setting, so we need a way to
let them over-ride the JDK default behaviour.

Solution
--------

Define a new implementation system property "jdk.allowMacOSTabbedWindows",
to let users opt in to the Mac OS tabbed Window functionality.
This property is set to false by default.
It does not itself force tabbed windows, but allows JDK to follow the system default behavior.

This property has no effect on any platform other than macOS.

The choice of "jdk" prefix is in large part because OpenJFX intends to adopt the same prefix
and there is precedent for this in other cases where AWT/2D/Swing and OpenJFX want to
behave consistently with each other.

This system property will not be documented but will be provided on request.

Specification
-------------
 
Tabbed windows for JDK applications on macOS can be allowed by specifying
-Djdk.allowMacOSTabbedWindows=true/TRUE/tRUE/TrUE..

Comments
[~trebari] and [~prr], thanks for the additional context; moving to Approved.
04-06-2021

[~darcy] How do we say "exported private" in the CSR ? Basically it is something that would be provided on request rather than documented.
04-06-2021

We are not going to document this property.
04-06-2021

So, is this going to be documented in a release note? A sytemPropery tag described in javadoc? Not documented? Something else? Moving back to Provisional; please updated with the doc status and re-Finalize.
03-06-2021

I've updated it even more to what I think it should look like :-)
03-06-2021

[~serb] [~jdv] [~prr] please review the CSR as well.
03-06-2021

[~kcr] Thanks for the detailed review. I have made changes to the CSR suggested by you to make it more clear. Also modified it to the latest changes in the PR.
03-06-2021

[~trebari] I think this could use a little more detail, especially the Problem and Specification sections. Summary section: I would say "system property" rather than "JDK property" (also applies to the Solution section). Also, I would drop the word "new" from tabbing functionality. Maybe something more like this: 'Add a new system property `jdk.allowMacOSTabbedWindows` to let users opt in to the macOS tabbed windows functionality.' Problem section: You might consider something more like this: 'When an application opens a dialog in full screen mode on macOS, it will open in a new tab rather than a new window, causing the application to freeze. This can also happen when not in full-screen mode if the user sets their "Prefer tabs" preference to "Always".' Specification section: I recommend taking a look at JDK-8262499 for a good example of how to document a new system property.
03-06-2021

How is this setting planned to be documented? This is short term solution to https://bugs.openjdk.java.net/browse/JDK-8266026, until we figure out the all the case to support new tab window feature. If the setting of "true" allows an application freeze, should it be allowed to have a value of true? Yeah initially we thought to disable it but in some cases it works fine so we decided give the choice to the users. We are allowing users to make a choice, in case of an application freeze users should not turned it on. If there are no such issue , then they can turned it on , and can have the new tab window behaviour of MAC OS. If the behavior is mac os specific, should the name of the property indicated that? Yes i have changed it to jdk.allowMacOSTabbedWindows
28-05-2021

Moving to Provisional, not Approved. Please have one or more client engineers review the request before it is Finalized for the second phase of CSR review. How is this setting planned to be documented? If the setting of "true" allows an application freeze, should it be allowed to have a value of true? If the behavior is mac os specific, should the name of the property indicated that?
18-05-2021

PR (review in progress) : https://github.com/openjdk/jdk/pull/3407
17-05-2021