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

Gtk: iconification through window trim leads to incorrect notification on owned windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • tbd
    • 8u20
    • javafx

    Description

      @Override
          public void start(Stage stage) throws Exception {
              final Button button = new Button("ABCDEFG");
              stage.setScene(new Scene(new Group(button),200f,100f));
              stage.show();
              Stage stage2 = new Stage();
              stage2.setTitle("Stage 2");
              stage2.setScene(new Scene(new Group(),200f,100f));
              stage2.initOwner(stage);
              stage2.show();
              
              stage.iconifiedProperty().addListener(new ChangeListener<Boolean>() {

                  @Override
                  public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
                      System.out.println("stage.inconified=" + stage.isIconified());
                  }
              });
              
              stage2.iconifiedProperty().addListener(new ChangeListener<Boolean>() {

                  @Override
                  public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
                      System.out.println("stage2.inconified=" + stage2.isIconified());
                  }
              });
              
              
              button.setOnAction(new EventHandler<ActionEvent>() {

                  @Override
                  public void handle(ActionEvent t) {
                      stage.setIconified(true);
                  }
              });
          }


      Minimize the window using the trim, you'll get:
      stage.inconified=true
      stage2.inconified=true
      stage2.inconified=false

      Using, the button, you get the correct behaviour:
      stage.inconified=true

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              msladecek Martin Sládeček
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Imported: