On Thu, 24 Apr 2025 18:11:32 GMT, Markus Mack <mm...@openjdk.org> wrote:

> Yes, the controls are in an `HBox` with `HeaderBar.draggable=true`. So this 
> is working as documented in `HeaderBar.draggable`. I still wonder if there's 
> something that can be done to prevent controls from being broken by becoming 
> draggable, especially if this happens inadvertently by "inheriting" this bit 
> from its container.
> 
> Some ideas:
> 
> 1. Let every `Node` in the subtree inherit the draggable=true bit, except 
> those that are `Control`s
> 2. Add code to all affected controls to make them work while being draggable
> 3. Prevent or ignore the draggable bit on all or all affected controls
> 4. Don't apply draggable=true to the sub-tree

I've decided to replace the `draggable` bool flag with a new `HeaderDragType` 
enum, which is one of the following values:
1. `DRAGGABLE`: Marks a single node as draggable.
2. `DRAGGABLE_SUBTREE`: Marks a node and all of its descendants as draggable.
3. `NONE`: Cancels an inherited `DRAGGABLE_SUBTREE` flag.

This should make your example easier, since you only need to mark the `HBox` as 
`DRAGGABLE`, without worrying about the controls.

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

PR Comment: https://git.openjdk.org/jfx/pull/1605#issuecomment-2832558981

Reply via email to