wheel: accumulate scroll when direction changes
authorJosé Expósito <jose.exposito89@gmail.com>
Thu, 30 Sep 2021 15:50:26 +0000 (17:50 +0200)
committerJosé Expósito <jose.exposito89@gmail.com>
Mon, 8 Nov 2021 17:00:46 +0000 (18:00 +0100)
commitd21f1ab7abb792a5bd467ea120e0742fe03f6bb5
tree5c91ba7251c18c2b7fdf4f5e60f4d2926730a835
parentb6a944bb80a9bb886bf38508e8a2b85be22dda57
wheel: accumulate scroll when direction changes

Most mice with high-resolution support have a mechanism in place to
adjust the wheel to a detent. When scrolling, it is possible to stop
between two detents and this mechanism could generate a small amount of
scroll in the oposite direction.

Track the scroll direction in the wheel state machine and reset it when
the direction changes to avoid this issue.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
src/evdev-fallback.h
src/evdev-wheel.c
test/test-pointer.c