Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8248490

[macOS] Undecorated stage does not minimize

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • jfx15
    • jfx11, 8u251, jfx14
    • javafx
    • Mac OS 10.15.5

        Run the below sample on a MacOS Catalina. Setting iconified property to true has no effect on an undecorated stage.

        ```
        import javafx.application.Application;
        import javafx.scene.Scene;
        import javafx.scene.control.Button;
        import javafx.stage.Stage;
        import javafx.stage.StageStyle;

        public class TestApp extends Application {

            @Override
            public void start(Stage stage) {
                stage.initStyle(StageStyle.UNDECORATED);
                Button button = new Button("Minimize");
                button.setStyle("-fx-background-color: red;");
                button.setOnAction(evt -> stage.setIconified(true));
                Scene scene = new Scene(button); stage.setScene(scene);
                stage.centerOnScreen();
                stage.show();
            }
        }
        ```

        Expected
        ========

        Pressing the button should minimize the application

        Actual
        ========

        Pressing the button does nothing

              kcr Kevin Rushforth
              abagarwal Abhinay Agarwal
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: