<div dir="ltr"><div dir="ltr">Hi Martin,<div><br></div><div>I’ve started a broader effort to fix some open Linux bugs related to XWayland and Xorg here:<div><br></div><div><a href="https://github.com/openjdk/jfx-sandbox/compare/master...glass_gtk_bug_squashing">https://github.com/openjdk/jfx-sandbox/compare/master...glass_gtk_bug_squashing</a></div><div><br></div><div>It's a work in progress—I'm planning to roll back some changes to narrow the modifications and submit some of it separately.</div><div><br></div><div>I noticed on the docs on the Stage the following statement:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In case that more Stage modes are set simultaneously their order of importance is iconified, fullScreen, maximized (from strongest to weakest).</blockquote><div><br></div><div>So I proceeded to try to honor it with the test:</div></div><div><br></div><div><font face="monospace">gradlew -PFULL_TEST=true -PUSE_ROBOT=true :systemTests:test --tests StageAttributesTest.testAttributesPrecedence<br></font></div><div><br></div><div>It now passes, but not without changes on the glass Java side (on the same branch).</div><div><br></div><div>-- Thiago</div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Em qui., 10 de abr. de 2025 às 14:01, Martin Fox <<a href="mailto:martinfox656@gmail.com">martinfox656@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>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 <<a href="mailto:thiago.sayao@gmail.com" target="_blank">thiago.sayao@gmail.com</a>> wrote:</div><br><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" target="_blank">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></div></blockquote></div></div>