-
Bug
-
Resolution: Unresolved
-
P4
-
jfx22, jfx23, jfx24
-
x86_64
-
linux_ubuntu
A DESCRIPTION OF THE PROBLEM :
According to this issue https://bugs.openjdk.org/browse/JDK-8088104 if stage is transparent then it must be also transparent for mouse events. The same problem we have in Ubuntu 20.04 (X11).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the provided code. Put another program under it, for example any browser. Create any mouse events inside transparent stage (black bordered box). The mouse events don't pass through. It seems that mouse events pass only in Windows.
---------- BEGIN SOURCE ----------
public class Test12 extends Application {
@Override
public void start(Stage primaryStage) {
var vBox = new VBox();
vBox.setStyle("-fx-border-width: 1; -fx-border-color: black");
vBox.setMouseTransparent(true);
var scene = new Scene(vBox, 400, 300);
scene.setFill(Color.TRANSPARENT);
scene.getStylesheets().add(this.getClass().getResource("test.css").toExternalForm());
primaryStage.initStyle(StageStyle.TRANSPARENT);
primaryStage.setScene(scene);
primaryStage.show();
primaryStage.setAlwaysOnTop(true);
}
public static void main(String[] args) {
launch(args);
}
}
CSS
.root { -fx-background-color: transparent; }
---------- END SOURCE ----------
FREQUENCY : always
According to this issue https://bugs.openjdk.org/browse/JDK-8088104 if stage is transparent then it must be also transparent for mouse events. The same problem we have in Ubuntu 20.04 (X11).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the provided code. Put another program under it, for example any browser. Create any mouse events inside transparent stage (black bordered box). The mouse events don't pass through. It seems that mouse events pass only in Windows.
---------- BEGIN SOURCE ----------
public class Test12 extends Application {
@Override
public void start(Stage primaryStage) {
var vBox = new VBox();
vBox.setStyle("-fx-border-width: 1; -fx-border-color: black");
vBox.setMouseTransparent(true);
var scene = new Scene(vBox, 400, 300);
scene.setFill(Color.TRANSPARENT);
scene.getStylesheets().add(this.getClass().getResource("test.css").toExternalForm());
primaryStage.initStyle(StageStyle.TRANSPARENT);
primaryStage.setScene(scene);
primaryStage.show();
primaryStage.setAlwaysOnTop(true);
}
public static void main(String[] args) {
launch(args);
}
}
CSS
.root { -fx-background-color: transparent; }
---------- END SOURCE ----------
FREQUENCY : always
- relates to
-
JDK-8088104 Mac: MouseEvents don't go through transparent stage
- Open