Blob Blame History Raw
From 6984628d6acf4695c24261c094def44ff37337be Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 12 Jun 2015 15:31:56 +1000
Subject: [PATCH libinput 1/9] filter: reduce deceleration to minimal speeds
 only

Deceleration at low speeds is intended to enhance precision when moving the
pointer slowly. However, the adaptive deceleration we used was badly
calibrated, at slow-but-normal speeds the pointer became too slow to manouver.

We don't want to drop deceleration completely, the subpixel precision it
provides is useful. And it also helps those that can't move a 1000dpi mouse by
exactly one unit.

Make the adaptive deceleration steeper so it only kicks in at extremely slow
motions and defaults to 1 at anything resembling normal movement (i.e. pointer
moves like the physical device does).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
---
 src/filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/filter.c b/src/filter.c
index a4142e9..69f78b1 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -386,7 +386,7 @@ pointer_accel_profile_linear(struct motion_filter *filter,
 	const double threshold = accel_filter->threshold; /* units/ms */
 	const double incline = accel_filter->incline;
 
-	s1 = min(1, 0.3 + speed_in * 4);
+	s1 = min(1, 0.3 + speed_in * 10);
 	s2 = 1 + (speed_in - threshold) * incline;
 
 	return min(max_accel, s2 > 1 ? s2 : s1);
-- 
2.4.3