Repository navigation
fix(paint): keep copying unchanged subtrees while a modal is open - #2667
Merged
Merged
Conversation
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.
Summary
PaintKeepwhile a modal is open: removedself.kbd.modal_scope.is_none()fromshareableinRuntimeCore::keep_begin(crates/rune/src/runtime/paint/keep.rs) so unchanged background subtrees (built withmemoorregion_with) and unchanged modal subtrees keep copying their paint output across edits, animations, and unchanged frames while a modal is open.own_key: foldedrt.modal_member(i)intoown_keyso opening, closing, or nesting a modal invalidates any node whose modal membership changed on that frame—clearing background hit registrations behind a modal and restoring them on close without stale hits.self.kbd.focus.entered_by_keys()inkeep_begin's shared key (matchingfocus_within_ring) and excludedEl::help_opennodes instatic_oksoHitState::help_heldis preserved across kept frames.Verification
cargo check -p runepassed.cargo test -p rune --lib "paint::keep::tests"passed (7/7), including two new headless tests verifyingmemoandregion_withbackground reuse during edits inside an open modal, background mutations under a modal,backdrop_blur, modal movement, nested modals, entrance/exit fades, strict debugkeep_check(0mismatches), and release-modeforce_copybyte-for-byte parity with fresh unskipped paints (instances,hits,wheel_hits,overlay_hits,help_hits,drop_hits,drawn,seen).runtime::paint::,runtime::input::help::tests,runtime::input::hit::tests,runtime::input::focus::, and modal test suites underRUNE_PAINT_KEEP_STRICT=1with zeroPaintKeepmismatches.--profile perfLinux benchmark from the issue.Fixes #2652