Repository navigation
Accept a zero gesture dead-zone instead of disabling all gestures - #1354
Merged
lujjjh merged 1 commit intoAug 28, 2026
Merged
Conversation
detectGesture guarded the axial-tolerance check with a strict < deadZone comparison, so a dead zone of 0 (valid, @Minimum 0, default 40) made absDelta < 0 always false and every side-button gesture fell through to no-op. Use <= so a 0 dead zone means 'only perfectly axial gestures are accepted', matching the inclusive comparisons already used elsewhere. Co-authored-by: Claude <[email protected]>
Collaborator
|
Thanks! |
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.
Summary
GestureButtonTransformer.detectGestureguarded the axial-tolerance check with strict< deadZone, so a validdeadZoneof 0 (@minimum 0, default 40) madeabsDelta < 0always false and disabled every side-button gesture. A 0 dead zone should mean "only perfectly axial gestures are accepted", not "gestures off".Root Cause
LinearMouse/EventTransformer/GestureButtonTransformer.swift,detectGesture: strict<instead of inclusive<=on the dead-zone comparison (the file already uses inclusivemagnitude >= thresholdcomparisons elsewhere).Changes
< deadZone-><= deadZoneon the Y (and X) dead-zone comparisons indetectGesture.GestureButtonTransformerTests: a perfectly axial drag atdeadZone == 0is now detected (red before, green after); an off-axis drag is still rejected atdeadZone == 0.Verification
make lint— no new violations vs main.GestureButtonTransformerTestspasses (targeted run, headless, code signing disabled). CI runs the full suite.Notes
1-px boundary shift for non-zero dead zones (negligible, strictly more correct: a tolerance of N px accepts drift 0..N inclusive).