Posible bug when maximizing an already maximized stage on Mac

José Pereda jose.pereda at gluonhq.com
Thu Mar 31 09:16:15 UTC 2016


Hi all,

Running this little test on a MacBook Pro Retina, OS X 10.11.4, with JDK
8u77:

    @Override
    public void start(Stage stage) {
        Button button = new Button("Click to maximize");
        button.setOnAction(e -> stage.setMaximized(true));
        Rectangle2D bounds = Screen.getPrimary().getVisualBounds();
        stage.setScene(new Scene(new StackPane(button), bounds.getWidth(),
bounds.getHeight()));
        stage.show();
    }

which shouldn't do anything at all, since the stage is already maximized,
turns into an iconified application, with root dimensions 0x0, stage
dimensions 0x22 (height of menubar), stage.isIconified() returns false, and
it can't be restored again to any visible size by any means other than
closing the application from the dock.

A posible situation where this could happen: persisting and restoring the
properties (x, y, width, height and maximized) of a maximized stage.


I haven't found any report of this. Should I file a bug?

Thanks,
Jose

--


More information about the openjfx-dev mailing list