#449: Migrate GTK click dispatch to FrameHitMap - #571
Merged
JDonaghy merged 2 commits intoJul 10, 2026
Conversation
…FrameHitMap Uses quadraui::ScreenLayout::hit_map() (quadraui#425) to recover a FrameHitMap from the same Editor/TabBar objects render_content already paints, without a second backend draw pass. click::pixel_to_click_target consults it first, falling back to render::screen_zone_hit_test's manual rect-walk for breadcrumb/divider zones (no FrameZone equivalent) and for the brief window before the first paint populates the cache. Scoped narrowly to Editor+TabBar only: including per-window StatusBar in the same hit map would have let it win over Editor for a window's bottom status row (StatusBar pushed after Editor, last-drawn-wins hit_test), changing top-level zone resolution for status-bar clicks. Dialog/ ContextMenu/Completions/etc. keep their existing cached Layout::hit_test() resolution in the overlay-arbitration cascade, which already runs before pixel_to_click_target and is unaffected.
…HitMap test coverage, fix TabBar idx offset bug Addresses review findings on the #449 FrameHitMap migration: - Confirmed `ScreenLayout::hit_map()` (quadraui#425) landed in the sibling quadraui checkout this repo actually path-depends on (../quadraui -> quadraui-fresh-560, commit c316f15). The prior request-changes review checked a stale, unrelated ~/src/quadraui clone that this repo's Cargo.toml does not resolve to. `cargo build --features gui` compiles clean. - Added unit test coverage for `frame_zone_to_screen_zone` and the `frame_hit_map` branch of `pixel_to_click_target`, building a real `quadraui::FrameHitMap` via `ScreenLayout::hit_map()` from the same Editor/TabBar surface construction `render_content` uses, instead of only exercising the `screen_zone_hit_test` fallback. - That new test coverage caught a real bug: `FrameZone::TabBar { idx }` carries the *global* surface index across the whole `ScreenLayout` (editors pushed first, tab bars after), but `cached_tab_bar_zones` was a plain `Vec` indexed 0.. per tab bar. Whenever at least one editor window was on screen (always), the index was off by the editor count and every tab-bar FrameHitMap lookup silently missed, falling back to `screen_zone_hit_test` without ever exercising the new dispatch path. Fixed by keying `cached_tab_bar_zones` by the real global surface index (a `HashMap<usize, (GroupId, Rect)>` instead of a `Vec`). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Closes #449
Automated merge from the coordinator for assignment 633dec489e20 on issue #449.
Worker branch:
issue-449-migrate-gtk-click-dispatch-to-framehitma→develop.