Signed-off-by: Peter Hutterer <[email protected]>
---
src/filter.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/filter.c b/src/filter.c
index a7cb545..77652a2 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -228,6 +228,13 @@ calculate_velocity_after_timeout(struct pointer_tracker
*tracker)
tracker->time + MOTION_TIMEOUT);
}
+/**
+ * Calculate the velocity based on the tracker data. Velocity is averaged
+ * across multiple historical values, provided those values aren't "too
+ * different" to our current one. That includes either being too far in the
+ * past, moving into a different direction or having too much of a velocity
+ * change between events.
+ */
static double
calculate_velocity(struct pointer_accelerator *accel, uint64_t time)
{
--
2.9.3
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel