On Sun, 17 Aug 2025 15:32:24 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

> This PR adds the necessary logic to automatically relayout unmanaged nodes 
> when they're dirty as specified by the documentation. Relevant sections 
> (emphasis mine):
> 
> ### Parent::requestLayout
> 
>> If this parent is either a layout root or unmanaged, then it will be added 
>> directly to the **scene's dirty layout list**, otherwise requestParentLayout 
>> will be invoked.
> 
> ### Node::managedProperty
> 
>> If a managed node's layoutBounds changes, it will **automatically trigger 
>> relayout** up the scene-graph to the **nearest layout root**
> 
> And:
> 
>> If an **unmanaged node** is of type `Parent`, it will act as a **"layout 
>> root"**
> 
> From this I conclude that:
> - A layout root is any node that is unmanaged (and of type `Parent`), or a 
> Scene's root node
> - Changes requiring layout in managed children that have an unmanaged parent 
> somewhere in their ancestry should cause layout to be triggered for the 
> affected areas
> - Automatic relayout is triggered either by scheduling a pulse (for scene 
> roots) or by adding a layout root to the Scene's dirty layout list
> 
> Note that Scene currently does not have a dirty layout list.
> 
> Note also that the documentation for `requestLayout` probably meant to say 
> "**scene** root or unmanaged" instead of "**layout** root or unmanaged."

If the node is unmanaged, why does it need a relayout in practice?

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

PR Comment: https://git.openjdk.org/jfx/pull/1874#issuecomment-3197735579

Reply via email to