Skip to content

fix(gesture): GestureHitTest scoped hit-test + deps cascade - #227

Merged
kolkov merged 1 commit into
mainfrom
fix/gesture-hittest
Aug 13, 2026
Merged

fix(gesture): GestureHitTest scoped hit-test + deps cascade#227
kolkov merged 1 commit into
mainfrom
fix/gesture-hittest

Conversation

@kolkov

@kolkov kolkov commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • GestureHitTest(pos) replaces GestureRecognizers() — container widgets return recognizers only for their interactive region
    • Collapsible: header area only
    • TabView: tab strip only
    • Docking: zone tabs only
  • ScrollView GestureAware removed — scrollbar drag handled by Event() handler
  • hitTestGestureRecursive: window→widget-local coordinate translation via ScreenOrigin()
  • deps: gg v0.52.3, gogpu v0.53.0, gpucontext v0.28.0, wgpu v0.31.4

Fixes gallery regression: parent container recognizers no longer consume child widget clicks.

Test plan

  • go build ./... / go test ./... / golangci-lint — all pass
  • Gallery: checkboxes, textfield, dropdown, collapsible — all work
  • Minimal repro: text selection, double-click, clipboard — all work
  • IDE example: layout renders correctly

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

…ureAware

GestureAware.GestureRecognizers() -> GestureHitTest(pos geometry.Point):
container widgets (Collapsible, TabView, Docking) return recognizers
only for their interactive region (header, tab strip, zone tabs).
Prevents parent recognizers from consuming child widget clicks.

ScrollView: removed GestureAware entirely. Scrollbar drag handled by
Event() handler with proper thumb hit-testing. Container widgets must
not compete with child recognizers in the gesture arena.

hitTestGestureRecursive: translates window coords to widget-local via
ScreenOrigin() before calling GestureHitTest.

Deps: gg v0.52.3, gogpu v0.53.0, gpucontext v0.28.0, wgpu v0.31.4.
@kolkov
kolkov force-pushed the fix/gesture-hittest branch from 471c089 to 0e14f21 Compare August 13, 2026 15:35
@kolkov
kolkov merged commit 858c6ac into main Aug 13, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant