You can try XShapeCombineMask with JNA to make the javafx window transparent for mouse events. Right now, your makeHalfTransparent function looks fine, but you're likely not applying the mask correctly to the javafx window. getWindowPointer needs fetched and applied the shape mask XSHapeCombineMask matching dimensions of the stage and call XFlush after applying the mask