[PATCH libinput] filter: don't allow an accel factor of 0 on the flat profile

Peter Hutterer peter.hutterer at who-t.net
Mon Sep 4 05:16:44 UTC 2017


Leave a narrow gap so the mouse moves excruciatingly slow instead of not
moving at all. This allows to recover from overexcited mouse speed slider
movements.

https://bugs.freedesktop.org/show_bug.cgi?id=102501

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 a31726cc..206695bb 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -1342,7 +1342,7 @@ accelerator_set_speed_flat(struct motion_filter *filter,
 	 * skipping over ever second pixel at 200% speed.
 	 */
 
-	accel_filter->factor = 1 + speed_adjustment;
+	accel_filter->factor = max(0.005, 1 + speed_adjustment);
 	filter->speed_adjustment = speed_adjustment;
 
 	return true;
-- 
2.13.5



More information about the wayland-devel mailing list