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

[macos] Maximize stage does not work

    XMLWordPrintable

    Details

      Description

      FULL PRODUCT VERSION :
      8.0.162-b12

      ADDITIONAL OS VERSION INFORMATION :
      10.13.1

      A DESCRIPTION OF THE PROBLEM :
      Reopening issue JDK-8194728

      When maximizing a stage it becames invisible.

      Finally found the piece of code causing the problem mentioned in JDK-8194728


      REGRESSION. Last worked in version 8u151

      ADDITIONAL REGRESSION INFORMATION:
      8.0.144 was the last working version

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a Stage and prevent maximize with the following code:
      stage.maximizedProperty().addListener((observable, oldValue, newValue) -> {
        if (newValue) {stage.setMaximized(false);} });

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Not to became invisible
      ACTUAL -
      Became invisible

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Stage stage = new Stage(StageStyle.DECORATED);
      FXMLLoader fxmlLoader = new FXMLLoader();
      URL location = getClass().getResource("/*Any FXML FILE*/");
      fxmlLoader.setLocation(location);
      fxmlLoadersetRoot(null);
      fxmlLoader.setController(null);
      Parent root = (Parent) MainModel.getInstance().fxmlLoader.load();
      Scene scene = new Scene(root);
      stage.setScene(scene);
      stage.setMinHeight(200);
      stage.setMinWidth(200);
      stage.maximizedProperty().addListener((observable, oldValue, newValue) -> {
        if (newValue) {stage.setMaximized(false);} });
      stage.show;
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Using .144 release until now
      But not an option anymore because if WebKit Bug.
      JDK-8173250

      Now, remove code
      stage.maximizedProperty().addListener((observable, oldValue, newValue) -> {
        if (newValue) {stage.setMaximized(false);} });

      Not sure anymore why i had to prevent it to became maximized.
      I think it was caused by a different behavior between OSX and Windows.

      Need testing now.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: