Conversation
- press/release/move now bubble from the front-most hit node to its ancestors until a handler consumes (returns true), matching how scroll has always propagated; the first press consumer becomes the grabbedNode and owns the drag and the matching release - RectNode defaults still consume, so existing UIs are unchanged; return false from onMousePress to let ancestors see the event - secondary windows now dispatch move/drag/scroll/key to the node tree and gate all tree dispatch on !consumed, matching the main window (previously only press/release reached the tree, ungated, so overlay consumers like imgui could not shield the tree) - Window gains dispatchMouseMove/Scroll/KeyPress/KeyReleaseToTree - add core/tests/mouseBubbling: 14 headless behavioral checks (bubble-to-consumer with per-level local coords, grab follows the consumer, unconsumed walk, front-most consumer stops, move bubbles)
…bbling + secondary-window tree dispatch parity)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mouse event bubbling (v0.7)
press/release/movenow bubble from the front-most hit node up the parent chain until a handler consumes the event (returnstrue) — the same propagationscrollhas always had. The first press consumer becomes the grab target: it owns the drag and the matching release.RectNode's default handlers still consume, so existing UIs behave identically. ReturnfalsefromonMousePress(etc.) to let ancestors see the event.consumed, matching the main window. Previously only press/release reached the tree (ungated), so overlay consumers like tcxImGui could not shield the tree in secondary windows.core/tests/mouseBubbling(14 headless behavioral checks), picked up automatically by CI's core-tests step.Windowtree-dispatch helpers are hidden from the API reference as internal glue.Verification
RectNode::onMousePressen/ja/ko);check.js --strictpasses locally