On Tue, 10 Oct 2023 19:29:16 GMT, Phil Race <p...@openjdk.org> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Restore current frame to maximise=false when another frame is maximised > > src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java > line 80: > >> 78: if (f.isMaximizable()) { >> 79: if (!f.isMaximum()) { >> 80: f.setMaximum(true); > > So if the new frame is set to maximum=true, don't you need to set the current > frame to maximum=false ? > The way I'm interpreting the class doc. and the comment about "transfer" is > that only one frame can be in the maximised state. I was interpreting it as transfer the attribute but retain it for current frame....but it seems your interpretation is more logical...so I have updated the PR.. Since I guess there's no JInternalFrame equivalent in native widget, it leaves scope for interpretation.. Now with this fix, in SwingSet2 JInternalFrame demo in WindowsL&F - If Frame 0 maximised, it goes to maximised state - Then when another frame say, Frame 4 maximised, Frame 4 is not restored to un-maximised size but actually been maximised and Frame0 is restored to un-maximised state.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16097#discussion_r1353892790