[PATCH libinput] filter: reduce deceleration to minimal speeds only

Peter Hutterer peter.hutterer at who-t.net
Wed Jun 24 23:08:27 PDT 2015


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).

https://bugzilla.redhat.com/show_bug.cgi?id=1227039#c44

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 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



More information about the wayland-devel mailing list