Maximized undecorated stage

Abhinay Agarwal abhinay_agarwal at live.com
Mon Jan 13 05:45:22 UTC 2020


Hi Kevin,

Sounds logical.

I will file an issue in the JBS.

Best regards,
Abhinay
________________________________
From: openjfx-dev <openjfx-dev-bounces at openjdk.java.net> on behalf of Kevin Rushforth <kevin.rushforth at oracle.com>
Sent: Wednesday, January 8, 2020 4:36 AM
To: openjfx-dev at openjdk.java.net <openjfx-dev at openjdk.java.net>
Subject: Re: Maximized undecorated stage

Ideally, we wouldn't have this sort of platform-specific behavior. I can
see why the underlying platform might not support the concept of
maximizing an undecorated stage, so we either need to disable it on
Windows, live with the behavior, or else find some solution on macOS and
Linux.

-- Kevin


On 1/6/2020 1:43 AM, Abhinay Agarwal wrote:
> Hi,
>
> If maximize property is set to true for an undecorated Stage, the following behaviour is observed on different platforms:
>
>    *   Windows: Undecorated stage is maximized
>    *   MacOS: Undecorated stage is not maximized
>    *   Linux(Ubuntu): Undecorated stage is not maximized
>
> The following piece of code can be used to reproduce the behaviour:
>
> import javafx.application.Application;
> import javafx.scene.Scene;
> import javafx.scene.control.Label;
> import javafx.scene.layout.StackPane;
> import javafx.stage.Stage;
> import javafx.stage.StageStyle;
>
> public class MaximizedStage extends Application {
>      public void start (Stage stage) {
>          StackPane sp = new StackPane(new Label("Hello"));
>          stage.setScene(new Scene (sp, 500, 500));
>          stage.initStyle(StageStyle.UNDECORATED);
>          stage.show();
>          stage.setMaximized(true);
>      }
> }
>
>   Is there a reason why the stage gets maximized on Windows but fails on other platforms?
>
> Regards,
> Abhinay



More information about the openjfx-dev mailing list