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

Transparent stage is not transparent for mouse events in Ubuntu (X11)

XMLWordPrintable

      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


        1. screenshot.png
          screenshot.png
          104 kB
        2. test.css
          0.0 kB
        3. Test.java
          0.8 kB

            arapte Ambarish Rapte
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: