RFR: 6681958: Maximization state of JInternalFrames is corrupted by WindowsDesktopManager [v2]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Wed Oct 11 02:38:49 UTC 2023
> Issue is if one internal frame is open and maximized and another internal frame is created which is initialized with setMaximum(true) then after opening the second internal frame both internal frames are non-maximized
> It can also be seen with SwingSet2 JInternalFrameDemo in WIndowsLookAndFeel i.e. when Frame 0 is maximised, and then Frame1 is maximised and then minimised, Frame0 should remain maximised but it is now unmaximised
>
> Issues seen with JInternalFrame in WindowsLookAndFeel are
> - Frame 0 maximised
> - Frame 4 maximised, when minimised, Frame0 is seen to be restored to normal size with Frame4 minimised
> - Frame 0 is again maximised
> - Frame 4 maximised from minimised, instead of maximising, it restores both Frame0 and Frame4
>
> The fix makes sure the maximised internal frame remains maximised when the 2nd internal frame is maximised
> This code seems to be added for [JDK-5036083](https://bugs.openjdk.org/browse/JDK-5036083) which expects
> `When a frame is maximized and then minimized, the next frame should NOT be maximized.`
>
> It still honours that fix as the test mentioned in JDK-5036083 works as expected as mentioned above
>
> Also it is mentioned
> https://github.com/openjdk/jdk/blob/dc4bc4f0844b768e83406f44f2a9ee50686b1d9d/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java#L69-L70
>
> It can be seen it is still honored. In SwingSet2 JInternalFrameDemo in WindowsL&F, if Frame0 is maximised and then Frame1 is activated/selected, it becomes maximised
> Also, it doesn't cause any regression with our existing closed/open tests.
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
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16097/files
- new: https://git.openjdk.org/jdk/pull/16097/files/551bf763..51b331af
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16097&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16097&range=00-01
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/16097.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16097/head:pull/16097
PR: https://git.openjdk.org/jdk/pull/16097
More information about the client-libs-dev
mailing list