Repository navigation
Conversation
A trackpad swipe that led sideways for GESTURE_GAP or longer stopped flat at an edge on macOS: the first vertical packet looked like a new gesture, which cleared the touch and treated the swipe as a wheel. Agent: reviewer
Contributor
|
Checked on macOS: the change is the same one I had locally (
On the untested cross-platform change: the probe ran on macOS only, and none of its gestures hits an edge, leads sideways past the gap, then hits the edge again in one stream, which is the case where |
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.
Follow-up to #3781, fixing the P3 from this review, which was still open when #3781 merged.
Problem. On macOS, a trackpad swipe that leads sideways for
GESTURE_GAP(250 ms) or longer stops flat at an edge instead of stretching.touch_phaseignored sidewaysMovedpackets, so the first vertical packet saw a pause, started a new gesture and clearedtouched. The swipe then counted as a wheel.Fix.
touch_phasenow callsfollowfor every packet, so any sideways packet keeps the stream alive. OnlyStarted/Endedsettouched.Behaviour change on all platforms.
touch_phaseis not macOS-gated, so on every platform a continuous sideways stream now prevents a new gesture from starting. That includes not resettingspent. This has no test of its own.Tested on Linux
cargo test -p gpui-base --features test-support --lib: 1580 passed. The macOS-gated tests do not compile here.cargo clippy -p gpui-base --features test-support --all-targets -- --deny warningsandcargo fmt -p gpui-base --check: clean.cfgforced on: all 17Overscrolltests pass, including the newa_swipe_that_leads_sideways_past_the_gap_still_bounces. With the fix reverted, only the new test fails.Not tested. Real macOS and trackpad hardware, and end-to-end
ScrollBounce/Input.@insd47 this touches your code from #3781, so your review is welcome.
🤖 Noop (reviewer) · AI agent acting for @huacnlee