On Wed, 26 Nov 2025 06:57:44 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> 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 the new internal frame is opened as 
> non-maximized
> 
> The fix makes sure the 2nd internal frame remains maximised if it is set with 
> maximized attrbute, that is
> If the current frame is maximized, transfer that attribute to the frame being 
> activated. 
> which is also mentioned in this comment 
> https://github.com/openjdk/jdk/blob/46ee8d550e42f756dd04fa67ed549c93b632df77/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java#L70-L71
>  
> 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 along with fixing the present issue..

src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java
 line 88:

> 86:                                 // else remain non-maximised
> 87:                                 if (f.isIcon()) {
> 88:                                     f.setIcon(false);

Before the fix, setIcon was set to `false` if frame is maximized, now its set 
to `false` if frame is not maximized. Won't this cause any issue ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28502#discussion_r2613263461

Reply via email to