From 00dbe12e4196a781bb320070569274e2f1793a4d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 10 Apr 2020 18:43:29 +0200 Subject: input: slow trackpad scrolling now eventually scroll a line Before, we converted each axis event's scroll amount to an integer and scrolled that many lines. However, axis events are speed sensitive - very slow scrolling will result in events with a scroll amount that is < 1.0. For us, this meant we never scrolled a single line. You could slow scroll all day if you wanted, and still we would never scroll a single line. Fix this by aggregating the scroll amount from axis events until the scroll amount is > 1.0, and then scroll. --- wayland.h | 1 + 1 file changed, 1 insertion(+) (limited to 'wayland.h') diff --git a/wayland.h b/wayland.h index d827708c..e2abae72 100644 --- a/wayland.h +++ b/wayland.h @@ -292,6 +292,7 @@ struct wayland { struct timeval last_time; /* We used a discrete axis event in the current pointer frame */ + double axis_aggregated; bool have_discrete; } mouse; -- cgit v1.3