libinput 0.15.0

This commit is contained in:
Peter Hutterer 2015-05-05 17:23:23 +10:00
parent c2dbcdf9a2
commit 089f1ffb69
4 changed files with 15 additions and 77 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@
/libinput-0.12.0.tar.xz /libinput-0.12.0.tar.xz
/libinput-0.13.0.tar.xz /libinput-0.13.0.tar.xz
/libinput-0.14.1.tar.xz /libinput-0.14.1.tar.xz
/libinput-0.15.0.tar.xz

View File

@ -1,71 +0,0 @@
From 5703a748e1fdaab5cc76705fd4518bc33c65e207 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 24 Apr 2015 14:59:18 +1000
Subject: [PATCH libinput] evdev: init pointer accel filters when we have rel
x/y axes
Some devices provide abs x/y and rel x/y. We can't know which event the device
will send. The Microsoft Surface Type Cover sends relative devices, which
then crashes libinput when we don't have an accel filter set up.
So instead of checking that the device doesn't have ABS_X/Y, check for the
device to have REL_X/Y instead.
https://bugzilla.redhat.com/show_bug.cgi?id=1206869
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
src/evdev.c | 4 ++--
test/pointer.c | 14 +++++++++++++-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index 8ca7a76..e16747b 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1791,8 +1791,8 @@ evdev_configure_device(struct evdev_device *device)
}
if (udev_tags & EVDEV_UDEV_TAG_MOUSE) {
- if (!libevdev_has_event_code(evdev, EV_ABS, ABS_X) &&
- !libevdev_has_event_code(evdev, EV_ABS, ABS_Y) &&
+ if (libevdev_has_event_code(evdev, EV_REL, REL_X) &&
+ libevdev_has_event_code(evdev, EV_REL, REL_Y) &&
evdev_device_init_pointer_acceleration(
device,
pointer_accel_profile_linear) == -1)
diff --git a/test/pointer.c b/test/pointer.c
index 01ea2fd..9d3dda6 100644
--- a/test/pointer.c
+++ b/test/pointer.c
@@ -825,6 +825,17 @@ START_TEST(pointer_accel_defaults_absolute)
}
END_TEST
+START_TEST(pointer_accel_defaults_absolute_relative)
+{
+ struct litest_device *dev = litest_current_device();
+ struct libinput_device *device = dev->libinput_device;
+
+ ck_assert(libinput_device_config_accel_is_available(device));
+ ck_assert(libinput_device_config_accel_get_default_speed(device) == 0.0);
+ ck_assert(libinput_device_config_accel_get_speed(device) == 0.0);
+}
+END_TEST
+
START_TEST(pointer_accel_direction_change)
{
struct litest_device *dev = litest_current_device();
@@ -1223,7 +1234,8 @@ int main (int argc, char **argv) {
litest_add("pointer:accel", pointer_accel_defaults, LITEST_RELATIVE, LITEST_ANY);
litest_add("pointer:accel", pointer_accel_invalid, LITEST_RELATIVE, LITEST_ANY);
- litest_add("pointer:accel", pointer_accel_defaults_absolute, LITEST_ABSOLUTE, LITEST_ANY);
+ litest_add("pointer:accel", pointer_accel_defaults_absolute, LITEST_ABSOLUTE, LITEST_RELATIVE);
+ litest_add("pointer:accel", pointer_accel_defaults_absolute_relative, LITEST_ABSOLUTE|LITEST_RELATIVE, LITEST_ANY);
litest_add("pointer:accel", pointer_accel_direction_change, LITEST_RELATIVE, LITEST_ANY);
litest_add("pointer:middlebutton", middlebutton, LITEST_BUTTON, LITEST_POINTINGSTICK);
--
2.3.5

View File

@ -4,8 +4,8 @@
%global gitversion 58abea394 %global gitversion 58abea394
Name: libinput Name: libinput
Version: 0.14.1 Version: 0.15.0
Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
Summary: Input device library Summary: Input device library
License: MIT License: MIT
@ -18,8 +18,6 @@ Source2: commitid
Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz
%endif %endif
Patch01: 0001-evdev-init-pointer-accel-filters-when-we-have-rel-x-.patch
BuildRequires: git BuildRequires: git
BuildRequires: autoconf automake libtool pkgconfig BuildRequires: autoconf automake libtool pkgconfig
BuildRequires: libevdev-devel BuildRequires: libevdev-devel
@ -68,7 +66,9 @@ make %{?_smp_mflags}
find $RPM_BUILD_ROOT -name '*.la' -delete find $RPM_BUILD_ROOT -name '*.la' -delete
%post -p /sbin/ldconfig %post
/sbin/ldconfig
/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || :
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
@ -78,8 +78,13 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%{_libdir}/libinput.so.* %{_libdir}/libinput.so.*
%{udevdir}/libinput-device-group %{udevdir}/libinput-device-group
%{udevdir}/rules.d/80-libinput-device-groups.rules %{udevdir}/rules.d/80-libinput-device-groups.rules
%{udevdir}/rules.d/80-libinput-device-groups.rules
%{udevdir}/rules.d/90-libinput-model-quirks.rules
%{udevdir}/hwdb.d/90-libinput-model-quirks.hwdb
%{_bindir}/libinput-list-devices %{_bindir}/libinput-list-devices
%{_bindir}/libinput-debug-events
%{_mandir}/man1/libinput-list-devices.1* %{_mandir}/man1/libinput-list-devices.1*
%{_mandir}/man1/libinput-debug-events.1*
%files devel %files devel
%{_includedir}/libinput.h %{_includedir}/libinput.h
@ -88,6 +93,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%changelog %changelog
* Tue May 05 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.15.0-1
- libinput 0.15.0
* Fri Apr 24 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.14.1-2 * Fri Apr 24 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.14.1-2
- Fix crash with the MS Surface Type Cover (#1206869) - Fix crash with the MS Surface Type Cover (#1206869)

View File

@ -1 +1 @@
18f6e1d6ab58db9a66c5ee8ca20aa876 libinput-0.14.1.tar.xz f2e559ac926cb4afac6951e097364ab1 libinput-0.15.0.tar.xz