<AWT Dev> RFR: 8256465: [macos11] Java frame and dialog presented full screen freeze application

Kevin Rushforth kcr at openjdk.java.net
Sat Apr 10 16:53:29 UTC 2021


On Fri, 9 Apr 2021 22:39:18 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> 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.
>
>> 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.
> 
> Yes, this is what I tried to clarify, why we have such "strange behavior", what is the root cause, and how hard it to fix.
> 
>> 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.
> 
> That probably can be changed on our side, this looks similar to the case when the window is maximized to the "macOS fullscreen" and then restored .

There is a larger issue here than just a freeze in full-screen mode. A user can set their "Prefer tabs" preference for opening documents to "Always" (rather than the default "in full screen") on either 10.15 or 11.0, and then all top level windows will open up in a tab unless they are child (owned) windows. This leads to a variety of unexpected behavior, which is why I think disabling it (as we did for JavaFX and as is proposed in this PR) is the best option. An application's windows are not always conceptually a set of related documents, so opening up all windows in tabs seems wrong.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3407


More information about the awt-dev mailing list