On Thu, 20 May 2021 08:09:09 GMT, Tejpal Rebari <[email protected]> wrote:
>> Hi All,
>> Please review the following fix for jdk17.
>>
>> Issue : On MacOS 11 Java Frame and JDialog application is freezing in Full
>> Screen when the System Preference -> General -> Prefer Tabs is set to "Full
>> Screen". It is also freezing in normal screen when Prefer Tabs is set to
>> "Always".
>> It doesn't freeze when the Prefer tabs is set to "never".
>>
>> Fix : The default value of allowsAutomaticWindowTabbing is 0/NO in MacOS
>> prior to bigSur(11)
>> (in the AWTWindow.m file), so the issue is not seen in mac os 10.13 10.14
>> and 10.15.
>> From MacOS 11 onwards this value is set to 1/YES and the issue is seen.
>> This issue can also be reproduced in MacOS 10.15 by setting
>> setAllowsAutomaticWindowTabbing to true in the AWTWindow.m file.
>>
>> Fix is to set allowsAutomaticWindowTabbing to No for all the MacOS release
>> staring from 10.12.
>> The allowsAutomaticTabbing was introduced in MacOS 10.12 but the default
>> value changed in macos11.
>>
>> Test : Added a manual test and tested on MacOS 10.15 and 11.
>> All the internal tests run are green.
>
> Tejpal Rebari has updated the pull request incrementally with one additional
> commit since the last revision:
>
> made changed according to CSR comments
src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java line 198:
> 196: (PrivilegedAction<Object>) () -> {
> 197: allowMacOSAutomaticWindowTabbing =
> Boolean.parseBoolean(
> 198:
> System.getProperty("jdk.allowMacOSTabbedWindows"));
Just a thing to discuss, probably we can extract the string of the property to
where other similar properties are stored already.
src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m line 1107:
> 1105: JNI_COCOA_ENTER(env);
> 1106: if (allowAutomaticTabbing) {
> 1107: [NSWindow setAllowsAutomaticWindowTabbing:YES];
Should we access this property on the Appkit thread? Or this can be used
everywhere?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3407