From 3164021ea1ef20e11ba334b95405f99668c30d58 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 8 Apr 2015 16:04:06 +1000 Subject: [PATCH] Fix mouse slowdown (#1208992) --- ...dev-fix-inverted-mouse-normalization.patch | 32 +++++++++++++++++++ libinput.spec | 6 +++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-fix-inverted-mouse-normalization.patch diff --git a/0001-evdev-fix-inverted-mouse-normalization.patch b/0001-evdev-fix-inverted-mouse-normalization.patch new file mode 100644 index 0000000..581e39b --- /dev/null +++ b/0001-evdev-fix-inverted-mouse-normalization.patch @@ -0,0 +1,32 @@ +From 64b5e52868db96be9b899ba98b02d061a838304e Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 8 Apr 2015 15:52:58 +1000 +Subject: [PATCH libinput] evdev: fix inverted mouse normalization + +Regression introduced in 9f8edc5fd880e0a9c482b36e6b4120ccc056ee0b where it +changed from delta / (dpi/default) to delta * dpi/default, causing the inverse +effect of what the dpi setting is supposed to achieve. + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 00450bf..243cd22 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -230,8 +230,8 @@ normalize_delta(struct evdev_device *device, + const struct device_coords *delta, + struct normalized_coords *normalized) + { +- normalized->x = delta->x * (double)device->dpi / DEFAULT_MOUSE_DPI; +- normalized->y = delta->y * (double)device->dpi / DEFAULT_MOUSE_DPI; ++ normalized->x = delta->x * DEFAULT_MOUSE_DPI / (double)device->dpi; ++ normalized->y = delta->y * DEFAULT_MOUSE_DPI / (double)device->dpi; + } + + static void +-- +2.3.4 + diff --git a/libinput.spec b/libinput.spec index f068374..66eda63 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.13.0 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,6 +20,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch01: 0001-evdev-fix-crash-for-missing-ABS_X-Y.patch Patch02: 0002-evdev-fix-handling-of-fake-MT-devices-without-ABS_X-.patch +Patch03: 0001-evdev-fix-inverted-mouse-normalization.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -87,6 +88,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Wed Apr 08 2015 Peter Hutterer 0.13.0-3 +- Fix mouse slowdown (#1208992) + * Wed Apr 08 2015 Peter Hutterer 0.13.0-2 - Fix crasher triggered by fake MT devices without ABS_X/Y (#1207574)