<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hello,<div><br></div><div>Modern macOS apps tend to expand the client area of the window to take the entire window area including the titlebar. This is usually done by:</div><div><ol class="MailOutline"><li>Setting NSWindow.titlebarAppearsTransparent to true.</li><li>Setting NSWindow.styleMask NSWindowStyleMaskFullSizeContentView flag.</li></ol><div><br></div><div>This can be useful because it gives the app modern look, make use of all available window real-estate, and allows JavaFX developers to create completely custom windows like UNDECORATED styles without loosing the platform resize-window feature and the three window buttons.</div><div><br></div></div><div>Swing supports this already using code like this:</div><div><div>final var frame = new JFrame();</div><div>final var rootPane = frame.getRootPane();</div><div>rootPane.putClientProperty("apple.awt.fullWindowContent", true);</div><div>rootPane.putClientProperty("apple.awt.transparentTitleBar", true);</div></div><div><br></div><div>This can be done easily today using reflection to access non-public API to get the Stage native NSWindow handle and using FFM to change styleMask and set the titlebarAppearsTransparent property. I have created an example here (<a href="https://github.com/bahaa/jfx-transparent-window-titlebar">https://github.com/bahaa/jfx-transparent-window-titlebar</a>). But this approach has the following drawbacks:</div><div><ul class="MailOutline"><li>It uses non-public API.</li><li>JavaFX stage native window handle is available only after the stage is shown, this cause some flicker because the window style is changed after it’s shown to the user.</li></ul><div><br></div></div><div>I think JavaFX should support this out of the box. One possible solution is to introduce a new StageStyle that behaves like UNIFIED style (it falls back to DECORATED) if it’s not supported by the platform. I think something similar can be done on Windows (<a href="https://learn.microsoft.com/en-us/windows/win32/dwm/customframe">https://learn.microsoft.com/en-us/windows/win32/dwm/customframe</a>) but I’m not sure about GTK.</div><div><br></div><div>Thanks,</div><div>Bahaa.</div></body></html>