<AWT Dev> RFR: 8256465: [macos11] Java frame and dialog presented full screen freeze application
kcr at openjdk.java.net
Fri Apr 9 20:50:09 UTC 2021
On Fri, 9 Apr 2021 20:42:26 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>>> > 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.
>>> But why the option setAllowsAutomaticWindowTabbing=yes does not work? Why the nswindow in JDK is so specific?
>> As per my understanding we don't have support for opening window in a new Tab.And also it is always not a good idea to open in new Tab as the dialog size could be different. Similar fix is done for JavaFX(https://git.openjdk.java.net/jfx/pull/440) and for other application(like SPSS) it is advised to set System Preference -> General -> Prefer tabs to never.
> Without this fix, owned windows will open in a new window and new top level windows will open in a tab. As I discovered when evaluating [JDK-8263169](https://bugs.openjdk.java.net/browse/JDK-8263169), which @trebari referred to, if you open a modal window that isn't a child window of some other window, it can lead to strange behavior when you try to tab between them. Also, if the size of a new window is different, it will resize the shared frame that both windows use, and not restore it when you click the tab to go back to the other window.
> Without some sort of API support to give the application a choice (i.e., to "opt in" to the tabbing behavior), I think it makes the most sense to do what we did for JavaFX and what Tejpal proposed to do here.
It should be possible to create an automated robot test for this. I did this for the JavaFX fix by popping up two top level windows in different locations and verifying that I could click a button in each window.
More information about the awt-dev