Skip to content

Reconsider design of WindowTraversal to decouple input_focus #19770

Open
@alice-i-cecile

Description

@alice-i-cecile

Originally posted by @ickshonpe in #19736 (comment):

I really don't like that part of the design of WindowTraversal then, but I can see that it's out of scope to complain about it here. Feels like probably the input focus module shouldn't need to have any knowledge of windows at all.

Given that there are several places in Bevy where a UI node wants to know what window it's on, I wonder if it makes sense to propagate the window ref downward in the hierarchy (now that we have propagation).

The UI already does window entity propagation through the ComputedNodeTarget component. Maybe the propagation system needs to be replaced using the new features though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-Code-QualityA section of code that is hard to understand or changeS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedX-ContentiousThere are nontrivial implications that should be thought through

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions