Skip to content

applib/recognizer: drive the dead-zone fallback and make it geometric - #1893

Draft
Mearman wants to merge 1 commit into
coredevices:mainfrom
Mearman:fix/touch-nav-dead-zone-target
Draft

applib/recognizer: drive the dead-zone fallback and make it geometric#1893
Mearman wants to merge 1 commit into
coredevices:mainfrom
Mearman:fix/touch-nav-dead-zone-target

Conversation

@Mearman

@Mearman Mearman commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Draft — still validating on hardware.

Something else I noticed while experimenting with touch: on windows with a single registered widget (menu/scroll), any touch starting in the status-bar strip at the top of the screen did absolutely nothing — no scroll, no bridge buttons.

The router's dead-zone branch answers Tier-1 for the window's sole widget, but prv_resolve_widget_target only walks the active layer's parent chain, which by construction already failed (that's why the dead-zone branch ran). The latched target comes back NULL, the unified set is failed at the latch, and tier exclusion has already failed the bridge set — so both sets are dead and the touch drives nothing.

Two changes:

  • prv_resolve_widget_target now resolves the dead-zone fallback too, so the Tier-1 route actually has a driver, and the unified set's touch filter is gesture-stable (fresh resolve on the Touchdown, the latched route afterwards) so dragging out of the strip doesn't drop the widget mid-gesture.
  • The fallback is geometric on both sides: the sole widget captures the touch only when its layer frame contains the Touchdown point. The dead zone exists for content that continues beneath the status bar; a widget positioned away from the strip has nothing under the touch and must not capture it — which test_scroll_layer_touch__dispatch_no_trigger_leaves_manager_idle already documented in intent, and which pins the behaviour here.

New tests: dead-zone Touchdown latches and drives an ops-bearing sole widget through a full pan, and a sole widget away from the strip drops. Full unit suite green.

The status-bar dead-zone branch in prv_resolve_route answers Tier-1 for
the window's sole registered widget, but prv_resolve_widget_target only
walks the active layer's parent chain -- which by construction already
failed, or the dead-zone branch would not have run. The latched target
came back NULL, the unified set was failed at the latch, and tier
exclusion failed the bridge set, so a touch in the top strip drove
nothing at all.

Resolve the dead-zone fallback in the target resolver as well, so the
Tier-1 route has a driver, and keep the unified set's touch filter
gesture-stable: a fresh resolve on the Touchdown (the only event whose
dead-zone coordinate is meaningful) and the latched route afterwards, so
a finger dragging out of the strip does not drop the widget mid-gesture.

The fallback is now geometric on both sides: the sole widget captures a
dead-zone touch only when its layer frame contains the Touchdown point.
The dead zone exists for content that continues beneath the status bar;
a widget positioned away from the strip has nothing under the touch and
must not capture it.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
@Mearman
Mearman force-pushed the fix/touch-nav-dead-zone-target branch from 07bdb46 to 11ffc15 Compare August 19, 2026 21:04
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