0

Here is a video showing this bug: https://youtu.be/anF1pp1CVDg

It happens when I create a new window on top of the already existing one. I use this function:

public static void newWind(String fxml) throws IOException{
        FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml"));
        Parent root1 = (Parent) fxmlLoader.load();
        popup_stage = new Stage();
        Scene newscene = new Scene(root1, 720,480);
        newscene.getRoot().setStyle("-fx-font-family: 'Arial'");
        popup_stage.setScene(newscene);
        popup_stage.initModality(Modality.WINDOW_MODAL);    
        popup_stage.initOwner(stage_APP);    // this is the line that show the bug. if I remove this, window does not move
        popup_stage.initStyle(StageStyle.UNDECORATED);
        popup_stage.show();
    }

If I comment popup_stage.initOwner(stage_APP); the bug does not happen.

This bug only happens on Linux, as it's shown here ... is there a way to workaround this? I need the newWindow to be on focus and the old window stage to be freezed until the newWindow closes.

Here is the bug report, still not fixed: https://bugs.openjdk.org/browse/JDK-8255347

Allexj
  • 1,375
  • 6
  • 14
  • 29
  • Here is the bug report, still not fixed: https://bugs.openjdk.org/browse/JDK-8255347 – Allexj Aug 26 '22 at 07:26
  • my friend with Ubuntu 20.04 doesn't have this bug: https://stackoverflow.com/questions/73593523/why-doesnt-my-friend-have-this-bug-while-i-am – Allexj Sep 03 '22 at 15:45

0 Answers0