Commit Graph

4 Commits

Author SHA1 Message Date
Christian Hergert
4f63d83955 kineticscrolling: avoid stutter at tail of kinetic deceleration
When decelerating the kinetic scroll, we can get into a position where it
looks like we are stuttering. This happens because the amount we move is
so little that it takes multiple frames to make forward progress by one
pixel.

This prevents that by detecting when we have reached the slow stutter of
the deceleration and simply stops the deceleration phase immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=765493
2016-04-24 03:49:20 -07:00
Matthias Clasen
9545c01764 kinetic scrolling: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Chun-wei Fan
d8de23bef6 gtk/gtkkineticscrolling.c: Include fallback-c89.c
... as round() is being used, which is for C99 and later.  fallback-c89.c
includes math.h as well.
2014-06-06 14:47:19 +08:00
Lieven van der Heide
c726226825 gtk: Add kinetic scrolling helper
GtkKineticScrolling implements the actual physics laws for friction
and springs. When created, position/velocity/boundaries/constants are
given, so at every gtk_kinetic_scrolling_tick() it returns the current
position, and whether the system is in rest.

https://bugzilla.gnome.org/show_bug.cgi?id=729608
2014-06-05 16:49:23 +02:00