Kinetic scrolling overshoot is triggered when lifting the fingers from the touchpad, while keeping them still
Steps to reproduce
- Open an application that uses a GtkScrolledWindow, e.g. Evince.
- Scroll the view using two-fingers scroll or edge scroll.
- Stop moving your fingers, but keep them on the touchpad.
- Lift the fingers.
Current behavior
I define minimum scroll events as the libinput scroll events generated when moving the fingers on the touchpad as slow as possible.
If the touchpad generates one or two spurious events when lifting the fingers, on a touchpad that produces a minimum scroll event of 1.46 points, overshoot is triggered. This makes the view bounce away from where it was placed before lifting the fingers.
Expected outcome
The spurious events generated when lifting the fingers should be ignored, or trigger a simple deceleration, making the view stay close to where it was placed.
Version information
GTK+ 3.22.26 on Fedora 27.
Additional information
This is the libinput debug-events output when reproducing the problem:
event6 POINTER_AXIS +1.02s vert -3.16* horiz 0.24* (finger)
event6 POINTER_AXIS +1.03s vert -3.16* horiz 0.00 (finger)
event6 POINTER_AXIS +1.05s vert -2.91* horiz -0.24* (finger)
event6 POINTER_AXIS +1.06s vert -3.16* horiz -0.24* (finger)
event6 POINTER_AXIS +1.07s vert -3.89* horiz -0.24* (finger)
event6 POINTER_AXIS +1.09s vert -4.13* horiz 0.00 (finger)
event6 POINTER_AXIS +1.10s vert -4.37* horiz 0.00 (finger)
event6 POINTER_AXIS +1.11s vert -4.86* horiz 0.24* (finger)
event6 POINTER_AXIS +1.12s vert -5.83* horiz 0.24* (finger)
event6 POINTER_AXIS +1.14s vert -6.07* horiz 0.47* (finger)
event6 POINTER_AXIS +1.15s vert -2.19* horiz 0.47* (finger)
event6 POINTER_AXIS +1.16s vert -7.77* horiz 1.18* (finger)
event6 POINTER_AXIS +1.18s vert -7.04* horiz 1.18* (finger)
event6 POINTER_AXIS +1.19s vert -6.32* horiz 1.18* (finger)
event6 POINTER_AXIS +1.20s vert -4.62* horiz 0.71* (finger)
event6 POINTER_AXIS +1.21s vert -5.59* horiz 0.94* (finger)
event6 POINTER_AXIS +1.23s vert -3.89* horiz 0.71* (finger)
event6 POINTER_AXIS +1.24s vert -4.62* horiz 1.18* (finger)
event6 POINTER_AXIS +1.25s vert -4.62* horiz 1.18* (finger)
event6 POINTER_AXIS +1.27s vert -3.64* horiz 0.47* (finger)
event6 POINTER_AXIS +1.28s vert -1.94* horiz 0.24* (finger)
event6 POINTER_AXIS +1.29s vert -3.89* horiz 0.24* (finger)
event6 POINTER_AXIS +1.30s vert -1.46* horiz 0.00 (finger)
event6 POINTER_AXIS +1.32s vert -1.46* horiz 0.00 (finger)
event6 POINTER_AXIS +1.33s vert -1.46* horiz 0.00 (finger)
event6 POINTER_AXIS +1.50s vert -0.49* horiz -1.41* (finger)
event6 POINTER_AXIS +1.81s vert 3.64* horiz -2.12* (finger)
event6 POINTER_AXIS +1.82s vert 0.00* horiz 0.00* (finger)
The one before the last event is a spurious event, generated by my touchpad while lifting my fingers at the end of the scroll.
This issue is reproducible on my laptop, an ASUS N550JV, but it is not reproducible on other laptops, like an XPS 13. The main reason seems to be that, in the case of the XPS 13, the minimum scroll event is 0.61, so spurious events are never higher than 1. This is probably due to different touchpad resolutions.