-
Bug
-
Resolution: Fixed
-
P4
-
jfx11, 8, jfx14
-
x86
-
linux
A DESCRIPTION OF THE PROBLEM :
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
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the sample on different operating systems
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The stage should be maximized on all platform or should not maximize on any platform
ACTUAL -
The stage is maximized on Windows but doesn't maximize on Linux or Mac OS
---------- BEGIN SOURCE ----------
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);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Current workaround is to find the dimensions of the screen on which to the stage is to be shown and update the width and height of the Stage.
stage.initStyle(StageStyle.UNDECORATED);
stage.setWidth(Screen.getPrimary().getBounds().getWidth());
stage.setHeight(Screen.getPrimary().getBounds().getHeight());
stage.show();
FREQUENCY : always
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
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the sample on different operating systems
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The stage should be maximized on all platform or should not maximize on any platform
ACTUAL -
The stage is maximized on Windows but doesn't maximize on Linux or Mac OS
---------- BEGIN SOURCE ----------
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);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Current workaround is to find the dimensions of the screen on which to the stage is to be shown and update the width and height of the Stage.
stage.initStyle(StageStyle.UNDECORATED);
stage.setWidth(Screen.getPrimary().getBounds().getWidth());
stage.setHeight(Screen.getPrimary().getBounds().getHeight());
stage.show();
FREQUENCY : always
- is cloned by
-
JDK-8255835 [macOS] Undecorated stage cannot be maximized
-
- Resolved
-
- relates to
-
JDK-8236651 ☂ Simplify and update glass gtk backend
-
- Open
-
-
JDK-8253997 [macos] Stage set to maximized before showing will animate maximization
-
- Open
-
(1 links to)