Stage Maximized/Iconified at the same time

Andy Goryachev andy.goryachev at oracle.com
Thu Apr 10 16:16:55 UTC 2025


good catch!

-andy

From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of Thiago Milczarek Sayão <thiago.sayao at gmail.com>
Date: Thursday, April 10, 2025 at 05:17
To: openjfx-dev <openjfx-dev at openjdk.org>
Subject: Stage Maximized/Iconified at the same time
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250410/6bf6bf14/attachment.htm>


More information about the openjfx-dev mailing list