<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">The maximized state on Mac is murkier than it is on Windows and Linux but, yes, a window can be both iconified and maximized at the same time.<div><br></div><div>The code you referenced looks correct. If you de-iconify a maximized window the WindowEvent should be MAXIMIZE, not RESTORE.</div><div><br></div><div>What steps are you taking with your test app that’s creating buggy behavior? The only obvious problem I saw on Linux is that if you toggle the maximized state of an iconified window the iconified property can get cleared. This doesn’t happen on Mac.</div><div><div><br><blockquote type="cite"><div>On Apr 10, 2025, at 5:17 AM, Thiago Milczarek Sayão <thiago.sayao@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr">Hi,<br><div><br></div><div>I don't have a Mac to test, but on Linux and Windows, a window can be both maximized and iconified at the same time. It retains the maximized state when restored from being iconified.</div><div><br></div><div>I've mentioned this topic before, but it's now clear to me that there's a bug in JavaFX related to this behavior.</div><div><br></div><div>from glass ui\Window.java:</div><div><div style="background-color:rgb(30,31,34);color:rgb(188,190,196)"><pre style="font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(207,142,109)">final static public class </span>State {<br> <span style="color:rgb(179,174,96)">@Native </span><span style="color:rgb(207,142,109)">public static final int </span><span style="color:rgb(199,125,187);font-style:italic">NORMAL </span>= <span style="color:rgb(42,172,184)">1</span>;<br> <span style="color:rgb(179,174,96)">@Native </span><span style="color:rgb(207,142,109)">public static final int </span><span style="color:rgb(199,125,187);font-style:italic">MINIMIZED </span>= <span style="color:rgb(42,172,184)">2</span>;<br> <span style="color:rgb(179,174,96)">@Native </span><span style="color:rgb(207,142,109)">public static final int </span><span style="color:rgb(199,125,187);font-style:italic">MAXIMIZED </span>= <span style="color:rgb(42,172,184)">3</span>;<br>}</pre></div></div><div><br></div><div>from quantum GlassWindowEventHandler.java</div><div><br></div><div><div style="background-color:rgb(30,31,34);color:rgb(188,190,196)"><pre style="font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(207,142,109)">case </span>WindowEvent.<span style="color:rgb(199,125,187);font-style:italic">RESTORE</span>:<br> <span style="color:rgb(199,125,187)">stage</span>.<span style="color:rgb(199,125,187)">stageListener</span>.changedIconified(<span style="color:rgb(207,142,109)">false</span>);<br> <span style="color:rgb(199,125,187)">stage</span>.<span style="color:rgb(199,125,187)">stageListener</span>.changedMaximized(<span style="color:rgb(207,142,109)">false</span>);<br> <span style="color:rgb(207,142,109)">break</span>;</pre></div></div><div><br></div><div>TestStage.java for testing this:</div><div><a href="https://gist.github.com/tsayao/5efca2e6f0f661595b31da37e2e7df26">https://gist.github.com/tsayao/5efca2e6f0f661595b31da37e2e7df26</a></div><div><br></div><div>I probably can submit a fix.</div><div><br></div><div>-- Thiago.</div></div>
</div></blockquote></div><br></div></body></html>