gtkkineticscrolling: Do not take distance based shortcuts
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 15 Mar 2022 21:42:13 +0000 (22:42 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 19 Mar 2022 11:35:11 +0000 (12:35 +0100)
commitf7d9ede82dca41241902d86e5ee7d1997c02f4a2
tree96d285946cb5862b0852f08c881fd32495adb651
parent65839f67f8b69e6bffe3cfe9940041d3a1836cf1
gtkkineticscrolling: Do not take distance based shortcuts

The pixel distance could be small enough between tick() calls that
this kind of checks might potentially become a problem. Rely only on
the calculated velocity to trigger the STOPPED phase, and use a lower
threshold to avoid cutting the animation too early.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/4725
gtk/gtkkineticscrolling.c