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

Mac: MouseEvents don't go through transparent stage

XMLWordPrintable

      Creating a Transparent Stage works fine on OS X Mavericks, but the stage is not Mouse-Transparent, so the scene rectangle blocks all mouse events from reaching applications behind (z-order) the JavaFX app. If I recall correctly this used to work in earlier versions, and also works on Windows.

      This is true even if I make the parent non-rectangular:

      @Override
          public void start(Stage primaryStage) {
              Circle circle = new Circle(100,100,100);
              StackPane root = new StackPane();
              root.getChildren().add(new Button("Hallo"));
              Scene scene = new Scene(root, 200, 200);
              root.setShape(circle);
              primaryStage.setScene(scene);
              primaryStage.initStyle(StageStyle.TRANSPARENT);
              scene.setFill(Color.TRANSPARENT);
              primaryStage.show();
          }

      Expected behaviour:

      Mouse events inside the scene rectangle but outside the circle in the four corners should go through to the application below the JavaFX app

      Perceived Behaviour:

      MouseEvents don't go through.

            Unassigned Unassigned
            aepplejfx Anton Epple (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Imported: