libevdev 1.5.3

This commit is contained in:
Peter Hutterer 2016-08-22 07:53:14 +10:00
parent 9b039b84f0
commit b53be5a30c
4 changed files with 7 additions and 43 deletions

1
.gitignore vendored
View File

@ -26,3 +26,4 @@
/libevdev-1.5.0.tar.xz /libevdev-1.5.0.tar.xz
/libevdev-1.5.1.tar.xz /libevdev-1.5.1.tar.xz
/libevdev-1.5.2.tar.xz /libevdev-1.5.2.tar.xz
/libevdev-1.5.3.tar.xz

View File

@ -1,37 +0,0 @@
From b313c87ab188c471b356b1c3a170bec5571aee68 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 17 Aug 2016 10:48:43 +1000
Subject: [PATCH libevdev] Don't bother sanitizing disabled event codes
Filter them immediately instead of passing them on and relying on the actual
event handling code to filter them.
Reproducer: if EV_ABS is disabled on an Apple MagicMouse we still get events
passed into sanitize_event(). But the code handling EV_ABS events doesn't
update the state, so we end up complaining about double tracking IDs, even
though that is not actually correct.
https://bugzilla.redhat.com/show_bug.cgi?id=1361325
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
libevdev/libevdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libevdev/libevdev.c b/libevdev/libevdev.c
index 48b49b1..43a095c 100644
--- a/libevdev/libevdev.c
+++ b/libevdev/libevdev.c
@@ -979,6 +979,9 @@ sanitize_event(const struct libevdev *dev,
struct input_event *ev,
enum SyncState sync_state)
{
+ if (!libevdev_has_event_code(dev, ev->type, ev->code))
+ return EVENT_FILTER_DISCARD;
+
if (unlikely(dev->num_slots > -1 &&
libevdev_event_is_code(ev, EV_ABS, ABS_MT_SLOT) &&
(ev->value < 0 || ev->value >= dev->num_slots))) {
--
2.7.4

View File

@ -1,6 +1,6 @@
Name: libevdev Name: libevdev
Version: 1.5.2 Version: 1.5.3
Release: 2%{?dist} Release: 1%{?dist}
Summary: Kernel Evdev Device Wrapper Library Summary: Kernel Evdev Device Wrapper Library
Group: System Environment/Libraries Group: System Environment/Libraries
@ -8,8 +8,6 @@ License: MIT
URL: http://www.freedesktop.org/wiki/Software/libevdev URL: http://www.freedesktop.org/wiki/Software/libevdev
Source0: http://www.freedesktop.org/software/%{name}/%{name}-%{version}.tar.xz Source0: http://www.freedesktop.org/software/%{name}/%{name}-%{version}.tar.xz
Patch01: 0001-Don-t-bother-sanitizing-disabled-event-codes.patch
BuildRequires: automake libtool BuildRequires: automake libtool
BuildRequires: python BuildRequires: python
@ -33,7 +31,6 @@ Utilities to handle and/or debug evdev devices.
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch01 -p1
%build %build
autoreconf --force -v --install || exit 1 autoreconf --force -v --install || exit 1
@ -68,6 +65,9 @@ rm -f %{buildroot}%{_libdir}/*.la
%{_bindir}/libevdev-tweak-device %{_bindir}/libevdev-tweak-device
%changelog %changelog
* Mon Aug 22 2016 Peter Hutterer <peter.hutterer@redhat.com> 1.5.3-1
- libevdev 1.5.3
* Wed Aug 17 2016 Peter Hutterer <peter.hutterer@redhat.com> 1.5.2-2 * Wed Aug 17 2016 Peter Hutterer <peter.hutterer@redhat.com> 1.5.2-2
- Fix complaints about double tracking IDs on the MagicMouse (#1361325) - Fix complaints about double tracking IDs on the MagicMouse (#1361325)

View File

@ -1 +1 @@
96ad6edb5ce5c4428f1b183cc180ff8c libevdev-1.5.2.tar.xz 60a9eb9a338c725d0dc571c0c978d2a7 libevdev-1.5.3.tar.xz