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.

The code you referenced looks correct. If you de-iconify a maximized window the 
WindowEvent should be MAXIMIZE, not RESTORE.

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.

> On Apr 10, 2025, at 5:17 AM, Thiago Milczarek Sayão <thiago.sa...@gmail.com> 
> wrote:
> 
> Hi,
> 
> 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.
> 
> I've mentioned this topic before, but it's now clear to me that there's a bug 
> in JavaFX related to this behavior.
> 
> from glass ui\Window.java:
> final static public class State {
>     @Native public static final int NORMAL = 1;
>     @Native public static final int MINIMIZED = 2;
>     @Native public static final int MAXIMIZED = 3;
> }
> 
> from quantum GlassWindowEventHandler.java
> 
> case WindowEvent.RESTORE:
>     stage.stageListener.changedIconified(false);
>     stage.stageListener.changedMaximized(false);
>     break;
> 
> TestStage.java for testing this:
> https://gist.github.com/tsayao/5efca2e6f0f661595b31da37e2e7df26
> 
> I probably can submit a fix.
> 
> -- Thiago.

Reply via email to