From f214e24e936c089f2c16b6e2cf72994f56d105d2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Aug 2015 16:36:45 +1000 Subject: [PATCH] Fix pointer speed configuration, broke with 0.21.0 --- ...ix-acceleration-threshold-assignment.patch | 45 +++++++++++++++++++ libinput.spec | 7 ++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 0001-filter-fix-acceleration-threshold-assignment.patch diff --git a/0001-filter-fix-acceleration-threshold-assignment.patch b/0001-filter-fix-acceleration-threshold-assignment.patch new file mode 100644 index 0000000..3bd6ad4 --- /dev/null +++ b/0001-filter-fix-acceleration-threshold-assignment.patch @@ -0,0 +1,45 @@ +From 254f87564f485ff44b8426cac3ac7f8efc47e681 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 4 Aug 2015 15:08:25 +1000 +Subject: [PATCH libinput] filter: fix acceleration threshold assignment +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The new values were in units/us and didn't make the switch back to ms in +8a6825f1602. + +Signed-off-by: Peter Hutterer +Reviewed-by: Jonas Ã…dahl +--- + src/filter.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/filter.c b/src/filter.c +index 2506ee2..e11d58a 100644 +--- a/src/filter.c ++++ b/src/filter.c +@@ -78,6 +78,7 @@ filter_get_speed(struct motion_filter *filter) + */ + + #define DEFAULT_THRESHOLD 0.4 /* in units/ms */ ++#define MINIMUM_THRESHOLD 0.2 /* in units/ms */ + #define DEFAULT_ACCELERATION 2.0 /* unitless factor */ + #define DEFAULT_INCLINE 1.1 /* unitless factor */ + +@@ -333,9 +334,9 @@ accelerator_set_speed(struct motion_filter *filter, + assert(speed >= -1.0 && speed <= 1.0); + + /* delay when accel kicks in */ +- accel_filter->threshold = DEFAULT_THRESHOLD - speed / 4000.0; +- if (accel_filter->threshold < 0.0002) +- accel_filter->threshold = 0.0002; ++ accel_filter->threshold = DEFAULT_THRESHOLD - speed / 4.0; ++ if (accel_filter->threshold < MINIMUM_THRESHOLD) ++ accel_filter->threshold = MINIMUM_THRESHOLD; + + /* adjust max accel factor */ + accel_filter->accel = DEFAULT_ACCELERATION + speed * 1.5; +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index 9b14cd4..80b7d38 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.21.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -21,6 +21,8 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} # Not upstream, keep until kernel 4.2 or 4.1.x with dbf3c37086 Patch01: 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch +Patch02: 0001-filter-fix-acceleration-threshold-assignment.patch + BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel @@ -97,6 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Aug 04 2015 Peter Hutterer 0.21.0-2 +- Fix pointer speed configuration, broke with 0.21.0 + * Tue Aug 04 2015 Peter Hutterer 0.21.0-1 - libinput 0.21.0 - fix 3fg touch detection on Synaptics semi-mt touchpads