From d704a72b3d920e44300ef31d2549036d031df3d7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Jul 2015 15:21:10 +1000 Subject: [PATCH] Restore parsing for trackpoing const accel --- ...inting-stick-const-accel-property-pa.patch | 58 +++++++++++++++++++ libinput.spec | 6 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 0001-evdev-restore-pointing-stick-const-accel-property-pa.patch diff --git a/0001-evdev-restore-pointing-stick-const-accel-property-pa.patch b/0001-evdev-restore-pointing-stick-const-accel-property-pa.patch new file mode 100644 index 0000000..2ecf862 --- /dev/null +++ b/0001-evdev-restore-pointing-stick-const-accel-property-pa.patch @@ -0,0 +1,58 @@ +From c096bedd8b21864b5ce27403a628c519ad00e148 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 21 Jul 2015 09:33:47 +1000 +Subject: [PATCH libinput] evdev: restore pointing stick const accel property + parsing + +Regression introduced in 8302860. + +Reading the DPI before evdev_configure_device makes it lose on the trackpoint +flag, causing libinput to ignore the POINTINGSTICK_CONST_ACCEL property. + +8302860 moved it up so we can init accel based on the DPI, this patch simply +moves istart t before the acceleration is initialized. + +https://bugs.freedesktop.org/show_bug.cgi?id=91369 + +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 05d9b17..07934de 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1958,6 +1958,10 @@ evdev_configure_device(struct evdev_device *device) + + if (udev_tags & EVDEV_UDEV_TAG_MOUSE || + udev_tags & EVDEV_UDEV_TAG_POINTINGSTICK) { ++ evdev_tag_external_mouse(device, device->udev_device); ++ evdev_tag_trackpoint(device, device->udev_device); ++ device->dpi = evdev_read_dpi_prop(device); ++ + if (libevdev_has_event_code(evdev, EV_REL, REL_X) && + libevdev_has_event_code(evdev, EV_REL, REL_Y) && + evdev_init_accel(device) == -1) +@@ -1975,9 +1979,6 @@ evdev_configure_device(struct evdev_device *device) + device->scroll.natural_scrolling_enabled = true; + /* want button scrolling config option */ + device->scroll.want_button = 1; +- +- evdev_tag_external_mouse(device, device->udev_device); +- evdev_tag_trackpoint(device, device->udev_device); + } + + if (udev_tags & EVDEV_UDEV_TAG_KEYBOARD) { +@@ -2146,7 +2147,7 @@ evdev_device_create(struct libinput_seat *seat, + device->scroll.wheel_click_angle = + evdev_read_wheel_click_prop(device); + device->model = evdev_read_model(device); +- device->dpi = evdev_read_dpi_prop(device); ++ device->dpi = DEFAULT_MOUSE_DPI; + + /* at most 5 SYN_DROPPED log-messages per 30s */ + ratelimit_init(&device->syn_drop_limit, 30ULL * 1000, 5); +-- +2.4.3 + diff --git a/libinput.spec b/libinput.spec index b2596cf..8e600cf 100644 --- a/libinput.spec +++ b/libinput.spec @@ -5,7 +5,7 @@ Name: libinput Version: 0.20.0 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT @@ -20,6 +20,7 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version} Patch04: 0001-touchpad-only-edge-scroll-while-the-finger-is-in-the.patch Patch05: 0001-udev-don-t-install-the-litest-udev-rules.patch +Patch06: 0001-evdev-restore-pointing-stick-const-accel-property-pa.patch BuildRequires: git BuildRequires: autoconf automake libtool pkgconfig @@ -97,6 +98,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Tue Jul 21 2015 Peter Hutterer 0.20.0-2 +- Restore parsing for trackpoing const accel + * Thu Jul 16 2015 Peter Hutterer 0.20.0-1 - libinput 0.20