Skip to content

A new finger takes the controls from one resting unmoved - #14

Merged
explodi merged 1 commit into
mainfrom
resting-finger-gives-way
Nov 20, 2026
Merged

explodi merged 1 commit into
mainfrom
resting-finger-gives-way

Conversation

@explodi

@explodi explodi commented Nov 20, 2026

Copy link
Copy Markdown
Owner

On a phone, the hand holding the device often rests on the screen. Before this change, a control owned the first finger to touch it until that finger lifted, so a palm resting on the interface (even on a panel's background) locked out every press after it.

A finger that has rested on the interface, unmoved, for longer than a tap (kFingerRestMs, 250 ms) now gives way to the next finger. Its own press is cancelled, so it never fires. A drag already under way keeps its finger, and so does a tap still in progress.

press_.startMs is now set for every press, not only one inside a Scroll. settleRestingFinger still reads it only for an undecided scroll.

Tests: bureau_tests, all 311 cases pass. Three new cases in view_test.cpp:

  • a finger presses beside a palm resting on the controls (fails without the change);
  • a second finger during a tap leaves the tap its press;
  • a finger dragging a control keeps it from a second finger.

A control owned the first finger until it lifted, so a palm or grip resting
on the interface locked out every other press. A finger down and unmoved
longer than a tap (kFingerRestMs) now gives way to the next one, its own
press cancelled. A drag under way, or a tap still in progress, keeps it.
@explodi
explodi merged commit af89c83 into main Nov 20, 2026
2 checks passed
@explodi
explodi deleted the resting-finger-gives-way branch November 20, 2026 18:23
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