4

I'm creating a JavaFX stage with StageStyle.TRANSPARENT so I can fully customize the window. I've created my own shadow effect around the border of my window (see link) to mimic the shadow around default application windows in OS X/Win7.

However, when a user clicks on the shadow around the border, the JavaFX stage will gain focus, which is understandable since the shadow is in the bounds of the JavaFX stage. Is there a way to cause clicking on the shadow part to "click through" and focus on the application/icon behind the JavaFX window? (Mouse transparency won't help for this).

So basically, when I click where the arrow is pointing in the image below, I want to focus on the text editor behind the JavaFX stage.

enter image description here

Community
  • 1
  • 1
dejuknow
  • 1,541
  • 2
  • 14
  • 30
  • Are the `JavaFX stage` and the `text editor` part of the same application ? – ItachiUchiha Sep 04 '14 at 13:42
  • No, the text editor is a separate application. – dejuknow Sep 04 '14 at 21:26
  • Have you found any solution? – Mitya XMitya Jan 25 '15 at 10:37
  • 2
    I think there is no solution for this. Its OS dependent that you cant click through a window. – Marcel Mar 13 '15 at 07:12
  • This [question proposes a solution for Windows (using JNA and native Windows event handling)](https://stackoverflow.com/questions/68957541/how-can-i-use-wm-nchittest-to-indicate-a-mouse-being-outside-the-application-are), though the author has not confirmed that the proposed solution would work and asked the question to gain assistance to create a working solution. – jewelsea Aug 27 '21 at 22:12

0 Answers0