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

[macOS] Undecorated stage does not minimize

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u251, openjfx11, openjfx14
    • Fix Version/s: openjfx15
    • Component/s: javafx
    • Environment:

      Mac OS 10.15.5

      Backports

        Description

        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

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: