-
Bug
-
Resolution: Fixed
-
P3
-
8u40, 9
-
None
-
Mac OS X 10.10
JDK 8u40
The following test case proves that for stages that are initialized with other stage styles than DECORATED, the stage.setFullScreen() method does not work. If you run the sample and try, say, StageStyle.TRANSPARENT, JavaFX hangs instead of making the stage full screen.
This is problematic, because modern Mac applications like Safari, Chrome, Spotify, etc., that place contents in the window title bar and use rounded corners are forced to use StageStyle.TRANSPARENT to do so. However, in Mac OSX Yosemite the green maximize button should now work as a full screen button according to Apples design guidelines. We cannot implement our own green full screen button and live up to the Mac guidelines, unless this bug is fixed.
public class FullScreenBug extends Application {
@Override
public void start(Stage stage) throws Exception {
BorderPane borderPane = new BorderPane();
ToggleButton button = new ToggleButton("Full Screen");
button.setOnAction(event -> {
stage.setFullScreen(button.isSelected());
});
borderPane.setCenter(button);
stage.setWidth(800);
stage.setHeight(600);
stage.setScene(new Scene(borderPane));
stage.initStyle(StageStyle.TRANSPARENT);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
This is problematic, because modern Mac applications like Safari, Chrome, Spotify, etc., that place contents in the window title bar and use rounded corners are forced to use StageStyle.TRANSPARENT to do so. However, in Mac OSX Yosemite the green maximize button should now work as a full screen button according to Apples design guidelines. We cannot implement our own green full screen button and live up to the Mac guidelines, unless this bug is fixed.
public class FullScreenBug extends Application {
@Override
public void start(Stage stage) throws Exception {
BorderPane borderPane = new BorderPane();
ToggleButton button = new ToggleButton("Full Screen");
button.setOnAction(event -> {
stage.setFullScreen(button.isSelected());
});
borderPane.setCenter(button);
stage.setWidth(800);
stage.setHeight(600);
stage.setScene(new Scene(borderPane));
stage.initStyle(StageStyle.TRANSPARENT);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
- duplicates
-
JDK-8145393 [Mac] Setting fullScreen on UNDECORATED or TRANSPARENT Stage hangs
-
- Closed
-
- relates to
-
JDK-8191885 [MacOS] JavaFX main window not resizable coming back from full screen mode in MacOS
-
- Resolved
-
-
JDK-8088742 [Glass, Mac] JVM crashes on Mac OS X after FullScreen mode
-
- Closed
-