Maximized undecorated stage

Thiago Milczarek Sayao thiago.sayao at
Tue Jan 14 01:06:54 UTC 2020

I have fixed it on Linux:

Can be ported to the current code:

void WindowContext::set_maximized(bool maximize) {
    is_maximized = maximize;
    if (maximize) {
        // enable the functionality
        GdkWMFunction wmf = (GdkWMFunction)(gdk_windowManagerFunctions | GDK_FUNC_MAXIMIZE);
        gdk_window_set_functions(gdk_window, wmf);

    } else {

De: openjfx-dev <openjfx-dev-bounces at> em nome de Abhinay Agarwal <abhinay_agarwal at>
Enviado: segunda-feira, 13 de janeiro de 2020 02:45
Para: Kevin Rushforth <kevin.rushforth at>; openjfx-dev at <openjfx-dev at>
Assunto: Re: Maximized undecorated stage

Hi Kevin,

Sounds logical.

I will file an issue in the JBS.

Best regards,
From: openjfx-dev <openjfx-dev-bounces at> on behalf of Kevin Rushforth <kevin.rushforth at>
Sent: Wednesday, January 8, 2020 4:36 AM
To: openjfx-dev at <openjfx-dev at>
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

-- 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.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