On Thu, 4 Dec 2025 14:40:43 GMT, Alessadro Parisi <[email protected]> wrote:

> On Linux Min 22.2 with Cinnamon I get a rectangular window no matter what. I 
> also tried setting the root's background color and radius, as well as the 
> scene's fill to `TRANSPARENT` but nothing works.
> 
> One thing I'm curious about is why it was implemented this way. I mean, if 
> the native decorations are just rendered on top of JavaFX nodes, then why I'm 
> not able to set the scene's fill to `TRANSPARENT` and let the developer 
> handle the rest.

The USP of an extended stage is: give me native window decorations (borders, 
drop shadows, animations, etc.) but don't give me the native title bar. As it 
turns out, this is surprisingly hard to do with GTK: we either get all of the 
decorations, or almost none of them. We can't tell GTK to just give us a 
native-looking window without the title bar, we can only get a completely 
undecorated window. We didn't forget the rounded corners, it's just a 
non-trivial thing to achieve.

Could we have implemented this feature in a way where you'll basically get a 
transparent window, and then have the application be responsible for drawing 
decorations and drop shadows? Maybe. But that would be a different feature, we 
want the native-looking windows without applications trying (and failing) to 
recreate their look-and-feel. In addition to that, such an approach would also 
lead to applications looking like they're stuck in time when a future OS 
version changes the styling of native window decorations.

@tsayao recently posted an 
[email](https://mail.openjdk.org/pipermail/openjfx-dev/2025-September/056374.html)
 to the mailing list with some thoughts on how the Linux situation could be 
improved.

> Edit: btw this is quite the issue because I can't achieve a consistent look 
> across the various systems. The only solution is to use a `TRANSPARENT` Stage 
> and make my own window buttons, losing a ton of features though (resize, 
> drag, snap assistants, etc.)

Using a transparent stage has even more downsides, as you'll not only lose all 
of the things you mentioned, but also window animations (on Windows) and drop 
shadows.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1936#issuecomment-3629422412

Reply via email to