On Tue, 10 Jun 2025 02:51:34 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
>> Implementation of >> [`StageStyle.EXTENDED`](https://gist.github.com/mstr2/0befc541ee7297b6db2865cc5e4dbd09). > > Michael Strauß has updated the pull request incrementally with one additional > commit since the last revision: > > only dispose ViewSceneOverlay when non-null As it turns out, the CSS engine _really_ wants all styleable nodes to be traceable to a single root node. If that's not the case (as in this PR with the overlay buttons), all kinds of things go wrong. I've fixed this issue by having the scene's root node be the parent of the scene overlay. Note that only the overlay knows that the scene root is its parent, the scene root has no knowledge of that (i.e. the overlay is not a child of the scene root that you can see with `Parent.getChildrenUnmodifiable()`) With this change, the CSS engine works correctly. As a side effect, it now also picks up stylesheets of the root node. This makes it possible to interfere with the internal stylesheets of the button overlay. In order to reduce the chance of that happening, I've renamed all style classes to have the `-FX-INTERNAL-` prefix. This should hopefully make it clear enough that this is not public API. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1605#issuecomment-2957567079