ADDITIONAL SYSTEM INFORMATION :
JavaFX 23, Java 22.0.1, Ubuntu 20.04.
A DESCRIPTION OF THE PROBLEM :
If someone tries to set width/height of the transparent Stage he will get error (width -> height error, height -> width error). So, it is not possible to do the simplest operation - to change window size. The problem appears in JavaFX 21. In JavaFX 20 everything works without errors.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public class JavaFxTest10 extends Application {
@Override
public void start(Stage primaryStage) {
var button = new Button("Test");
button.setOnAction(e -> {
System.out.println("Height:" + primaryStage.getHeight());
primaryStage.setWidth(primaryStage.getWidth() - 10);
});
var vBox = new VBox(button);
vBox.setStyle("-fx-background-color: yellow");
var scene = new Scene(vBox, 400, 300);
primaryStage.initStyle(StageStyle.TRANSPARENT);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
ACTUAL -
Height:300.0
(java:65340): Gtk-CRITICAL **: 21:08:15.801: gtk_window_resize: assertion 'height > 0' failed