title: JavaFX Modal Dialog disappear when owner Stage is iconified/Show
body: <p>my environment: Linux Suse 12.3, JDK 1.7.0_45, JavaFX 2.2, Compiler Compliance level 1.7.</p>
  
  <p>on ButtonAction a modal Dialog is opened, the Dialog Stage has an owner Stage.</p>
  
  <p>now dialog is opened but if i iconified the Owner and show it again, the Dialog is not visible. (thats happen only if i set <code>dialog.initModality(Modality.WINDOW_MODAL);</code> or <code>dialog.initModality(Modality.APPLICATION_MODAL);</code>) if i remove the Modality, its working just fine. <strong>UPDATE</strong> (modality is not the cause too, see my second update)</p>
  
  <p><strong>UPDATE:</strong> <em>i have this Problem <strong>ONLY</strong> if the application is maximized. if i click the window maximize icon and then show the dialog, then iconify the Owner, now if i show the Owner application again, dialog isn't visible!</em></p>
  
  <p>here is the Code:</p>
  
  <pre><code>import javafx.beans.value.ChangeListener;
  import javafx.beans.value.ObservableValue;
  import javafx.scene.Scene;
  import javafx.scene.layout.StackPane;
  import javafx.scene.paint.Color;
  import javafx.scene.text.Text;
  import javafx.stage.Modality;
  import javafx.stage.Stage;
  import javafx.stage.StageStyle;
  import you.faces.resources.YF;
  
  public class Alert {
  
      private String title = new String();
      private String message = new String();
  
      public Alert(Stage owner){
          final Stage dialog = new Stage();
  
          dialog.initOwner(owner); 
          dialog.initModality(Modality.WINDOW_MODAL);
          dialog.initStyle(StageStyle.TRANSPARENT);
              // i tried to redisplay the dialog like this, but still not working
          owner.iconifiedProperty().addListener(new ChangeListener&lt;Boolean&gt;() {
              @Override
              public void changed(
                      final ObservableValue&lt;? extends Boolean&gt; paramObservableValue,
                      final Boolean oldValue,
                      final Boolean newValue) {
                      if(newValue){
  
                      }else{  // none of these affect anything, dialog still not visible
  
                          dialog.setIconified(false);
                          dialog.show();
                          dialog.toFront();                       
                      }               
              }
          });
  
          StackPane root = new StackPane();
          root.getStyleClass().add("YOU-FACES-MODAL-DIALOG");
          root.getChildren().add(new Text(25, 25, "Hello World!"));
          Scene scene = new Scene(root,200, 100);
          scene.getStylesheets().add(YF.INSTANCE.getFile("clientUI.css"));
          scene.setFill(Color.TRANSPARENT);
          dialog.setScene(scene);
          //relativeToOwner(dialog,owner);
          dialog.show();
      }
  
      private void relativeToOwner(Stage stage, Stage owner) {
          stage.setX(owner.getX() + owner.getWidth() / 2 - stage.getWidth() / 2);
          stage.setY(owner.getY() + owner.getHeight() / 2 - stage.getHeight() / 2);
  
      }
  }
  </code></pre>
  
  <p>any idea how to deal with this Problem?
  Thanks</p>