libinput 1.10.7

This commit is contained in:
Peter Hutterer 2018-05-17 12:26:20 +10:00
parent ea254a5f10
commit 7dd7fed381
6 changed files with 7 additions and 201 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@
/libinput-1.10.4.tar.xz /libinput-1.10.4.tar.xz
/libinput-1.10.5.tar.xz /libinput-1.10.5.tar.xz
/libinput-1.10.6.tar.xz /libinput-1.10.6.tar.xz
/libinput-1.10.7.tar.xz

View File

@ -1,29 +0,0 @@
From 7ce9766162ee30e54eba544d9d83650e1c313d79 Mon Sep 17 00:00:00 2001
From: Veli-Jussi Raitila <vjr@iki.fi>
Date: Fri, 11 May 2018 12:26:16 +0300
Subject: [PATCH libinput] Add quirk to fix spurious palm detections on MacBook
Pro (13-inch, Mid 2009)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
udev/90-libinput-model-quirks.hwdb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
index dd5ae4d9..d5d47682 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -74,6 +74,10 @@ libinput:touchpad:input:b0005v05ACp030E*
libinput:touchpad:input:b0003v05ACp021A*
LIBINPUT_MODEL_APPLE_TOUCHPAD_ONEBUTTON=1
+# MacBookPro5,5 (Mid 2009)
+libinput:name:bcm5974:dmi:*:svnAppleInc.:pnMacBookPro5,5:*
+ LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=1000
+
##########################################
# Asus
##########################################
--
2.14.3

View File

@ -1,112 +0,0 @@
From 4172888e91281df81b226920a28117d24ee57266 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 27 Apr 2018 14:40:57 +1000
Subject: [PATCH libinput] touchpad: fix the trackpoint event counter for the
T460s
Introduced in 416fa44d80b0f2c53b652ddfa35dd4a156a65c65 but there was a logic
error: we claimed to require 3 events from a trackpoint before stopping the
touchpad but the timer was only set when we actually stopped the touchpad. So
if a trackpoint sends a single event every second, we'd disable the touchpad
after 3 seconds for the duration of the timeout, then again 3 seconds later,
etc.
Fix this by always setting the timeout and resetting the event counter if no
activity happened.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit c0fd857def5547f612d2c14ae57dda1cef47a92c)
---
src/evdev-mt-touchpad.c | 13 ++++++++++---
test/test-trackpoint.c | 30 ++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 3 deletions(-)
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index cc01976a..25520526 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -31,6 +31,7 @@
#include "evdev-mt-touchpad.h"
#define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT ms2us(300)
+#define DEFAULT_TRACKPOINT_EVENT_TIMEOUT ms2us(40)
#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1 ms2us(200)
#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2 ms2us(500)
#define THUMB_MOVE_TIMEOUT ms2us(300)
@@ -1912,8 +1913,10 @@ tp_trackpoint_timeout(uint64_t now, void *data)
{
struct tp_dispatch *tp = data;
- tp_tap_resume(tp, now);
- tp->palm.trackpoint_active = false;
+ if (tp->palm.trackpoint_active) {
+ tp_tap_resume(tp, now);
+ tp->palm.trackpoint_active = false;
+ }
tp->palm.trackpoint_event_count = 0;
}
@@ -1930,9 +1933,13 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data)
tp->palm.trackpoint_last_event_time = time;
tp->palm.trackpoint_event_count++;
+
/* Require at least three events before enabling palm detection */
- if (tp->palm.trackpoint_event_count < 3)
+ if (tp->palm.trackpoint_event_count < 3) {
+ libinput_timer_set(&tp->palm.trackpoint_timer,
+ time + DEFAULT_TRACKPOINT_EVENT_TIMEOUT);
return;
+ }
if (!tp->palm.trackpoint_active) {
tp_stop_actions(tp, time);
diff --git a/test/test-trackpoint.c b/test/test-trackpoint.c
index 46a66893..5cca9bc9 100644
--- a/test/test-trackpoint.c
+++ b/test/test-trackpoint.c
@@ -379,6 +379,35 @@ START_TEST(trackpoint_palmdetect_require_min_events)
}
END_TEST
+START_TEST(trackpoint_palmdetect_require_min_events_timeout)
+{
+ struct litest_device *trackpoint = litest_current_device();
+ struct litest_device *touchpad;
+ struct libinput *li = trackpoint->libinput;
+
+ touchpad = litest_add_device(li, LITEST_SYNAPTICS_I2C);
+ litest_drain_events(li);
+
+ for (int i = 0; i < 10; i++) {
+ /* A single event does not trigger palm detection */
+ litest_event(trackpoint, EV_REL, REL_X, 1);
+ litest_event(trackpoint, EV_REL, REL_Y, 1);
+ litest_event(trackpoint, EV_SYN, SYN_REPORT, 0);
+ libinput_dispatch(li);
+ litest_drain_events(li);
+
+ litest_touch_down(touchpad, 0, 30, 30);
+ litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1);
+ litest_touch_up(touchpad, 0);
+ litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
+
+ litest_timeout_trackpoint();
+ }
+
+ litest_delete_device(touchpad);
+}
+END_TEST
+
void
litest_setup_tests_trackpoint(void)
{
@@ -393,4 +422,5 @@ litest_setup_tests_trackpoint(void)
litest_add("trackpoint:palmdetect", trackpoint_palmdetect, LITEST_POINTINGSTICK, LITEST_ANY);
litest_add("trackpoint:palmdetect", trackpoint_palmdetect_resume_touch, LITEST_POINTINGSTICK, LITEST_ANY);
litest_add("trackpoint:palmdetect", trackpoint_palmdetect_require_min_events, LITEST_POINTINGSTICK, LITEST_ANY);
+ litest_add("trackpoint:palmdetect", trackpoint_palmdetect_require_min_events_timeout, LITEST_POINTINGSTICK, LITEST_ANY);
}
--
2.14.3

View File

@ -1,53 +0,0 @@
From 59eb10e593213403c301a5ce3fbd0a22b6e52efd Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 30 Apr 2018 10:40:45 +1000
Subject: [PATCH libinput] util: allow for palm pressure > 255
https://bugs.freedesktop.org/show_bug.cgi?id=105753
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
src/libinput-util.c | 4 +---
test/test-misc.c | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/libinput-util.c b/src/libinput-util.c
index 93d73827..e774fb78 100644
--- a/src/libinput-util.c
+++ b/src/libinput-util.c
@@ -425,9 +425,7 @@ parse_palm_pressure_property(const char *prop)
if (!prop)
return 0;
- if (!safe_atoi(prop, &threshold) ||
- threshold < 0 ||
- threshold > 255) /* No touchpad device has pressure > 255 */
+ if (!safe_atoi(prop, &threshold) || threshold < 0)
return 0;
return threshold;
diff --git a/test/test-misc.c b/test/test-misc.c
index c62cd03e..608bba61 100644
--- a/test/test-misc.c
+++ b/test/test-misc.c
@@ -1055,16 +1055,15 @@ START_TEST(palm_pressure_parser)
{ "1", 1 },
{ "10", 10 },
{ "255", 255 },
+ { "360", 360 },
{ "-12", 0 },
- { "360", 0 },
{ "0", 0 },
{ "-0", 0 },
{ "a", 0 },
{ "10a", 0 },
{ "10-", 0 },
{ "sadfasfd", 0 },
- { "361", 0 },
{ NULL, 0 }
};
--
2.14.3

View File

@ -4,8 +4,8 @@
%global gitversion 58abea394 %global gitversion 58abea394
Name: libinput Name: libinput
Version: 1.10.6 Version: 1.10.7
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,10 +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
Patch02: 0001-touchpad-fix-the-trackpoint-event-counter-for-the-T4.patch
Patch03: 0001-util-allow-for-palm-pressure-255.patch
Patch04: 0001-Add-quirk-to-fix-spurious-palm-detections-on-MacBook.patch
BuildRequires: git-core BuildRequires: git-core
BuildRequires: gcc gcc-c++ BuildRequires: gcc gcc-c++
BuildRequires: meson BuildRequires: meson
@ -113,6 +109,9 @@ The %{name}-utils package contains tools to debug hardware and analyze
%{_mandir}/man1/libinput-measure-trackpoint-range.1* %{_mandir}/man1/libinput-measure-trackpoint-range.1*
%changelog %changelog
* Thu May 17 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.10.7-2
- libinput 1.10.7
* Mon May 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.10.6-2 * Mon May 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.10.6-2
- Fix palm threshold on MacBookPro5,5 (#1575260) - Fix palm threshold on MacBookPro5,5 (#1575260)

View File

@ -1 +1 @@
SHA512 (libinput-1.10.6.tar.xz) = b76963c3429c5590ee04f1da94d08775c8bb8584830e678804fb1d4cf0e2af84826782eae71fdd57492461f85df87ac2fc940c280b0672c75cd81d5f34702fe4 SHA512 (libinput-1.10.7.tar.xz) = b102b8065ceed7511ad26efba34d5d9b0c13f0f7aaa882bb21501f7a5166f4cbe140fcbb488e90e6880bd47bb2b27667a4d6aa79b8726269fa1337897034a684