Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

20 changed files with 1035 additions and 1705 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libinput-1.16.3.tar.xz
SOURCES/libinput-1.19.3.tar.xz

View File

@ -1 +1 @@
ee1e93ee647bdd4598a5910eb654592563657d66 SOURCES/libinput-1.16.3.tar.xz
86fe886c829ba913a56500e0cf15ada34b6de4d6 SOURCES/libinput-1.19.3.tar.xz

View File

@ -1,100 +0,0 @@
From 207c40c49d81edee5dae15fa519704ffad6fbb40 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 3 Nov 2020 15:14:29 +1000
Subject: [PATCH libinput 1/4] Revert "tools: switch measure-touchpad-tap to
python-libevdev"
This reverts commit 274b80d06cd0fb51911fae9252c7a800c5f6af94.
---
tools/libinput-measure-touchpad-tap.py | 39 ++++++++++++++++----------
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/tools/libinput-measure-touchpad-tap.py b/tools/libinput-measure-touchpad-tap.py
index b42b78e3..e1b82d9d 100755
--- a/tools/libinput-measure-touchpad-tap.py
+++ b/tools/libinput-measure-touchpad-tap.py
@@ -27,7 +27,8 @@
import sys
import argparse
try:
- import libevdev
+ import evdev
+ import evdev.ecodes
import textwrap
import pyudev
except ModuleNotFoundError as e:
@@ -82,18 +83,27 @@ class InvalidDeviceError(Exception):
pass
-class Device(libevdev.Device):
+class Device(object):
def __init__(self, path):
if path is None:
self.path = self._find_touch_device()
else:
self.path = path
- fd = open(self.path, 'rb')
- super().__init__(fd)
- print("Using {}: {}\n".format(self.name, self.path))
+ self.device = evdev.InputDevice(self.path)
- if not self.has(libevdev.EV_KEY.BTN_TOUCH):
+ print("Using {}: {}\n".format(self.device.name, self.path))
+
+ # capabilities returns a dict with the EV_* codes as key,
+ # each of which is a list of tuples of (code, AbsInfo)
+ #
+ # Get the abs list first (or empty list if missing),
+ # then extract the pressure absinfo from that
+ codes = self.device.capabilities(absinfo=True).get(
+ evdev.ecodes.EV_KEY, []
+ )
+
+ if evdev.ecodes.BTN_TOUCH not in codes:
raise InvalidDeviceError("device does not have BTN_TOUCH")
self.touches = []
@@ -131,16 +141,16 @@ class Device(libevdev.Device):
end='')
def handle_key(self, event):
- tapcodes = [libevdev.EV_KEY.BTN_TOOL_DOUBLETAP,
- libevdev.EV_KEY.BTN_TOOL_TRIPLETAP,
- libevdev.EV_KEY.BTN_TOOL_QUADTAP,
- libevdev.EV_KEY.BTN_TOOL_QUINTTAP]
+ tapcodes = [evdev.ecodes.BTN_TOOL_DOUBLETAP,
+ evdev.ecodes.BTN_TOOL_TRIPLETAP,
+ evdev.ecodes.BTN_TOOL_QUADTAP,
+ evdev.ecodes.BTN_TOOL_QUINTTAP]
if event.code in tapcodes and event.value > 0:
error("\rThis tool cannot handle multiple fingers, "
"output will be invalid")
return
- if event.matches(libevdev.EV_KEY.BTN_TOUCH):
+ if event.code == evdev.ecodes.BTN_TOUCH:
self.handle_btn_touch(event)
def handle_syn(self, event):
@@ -151,13 +161,12 @@ class Device(libevdev.Device):
orientation=self.touch.orientation)
def handle_event(self, event):
- if event.matches(libevdev.EV_KEY):
+ if event.type == evdev.ecodes.EV_KEY:
self.handle_key(event)
def read_events(self):
- while True:
- for event in self.events():
- self.handle_event(event)
+ for event in self.device.read_loop():
+ self.handle_event(event)
def print_summary(self):
deltas = sorted(t.tdelta for t in self.touches)
--
2.28.0

View File

@ -1,36 +0,0 @@
From f8a01c184ab00b048fd5413214a3d8620fe0b060 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 23 Oct 2020 12:53:35 +1000
Subject: [PATCH libinput 1/5] evdev: quirks_get_tuples can deal with a NULL
quirks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit fa0c3ee38838be11a9e50cc51e4a5d42cc394b44)
---
src/evdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index 40f0726b..e6a00199 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2083,7 +2083,7 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
libevdev_disable_event_code(device->evdev, EV_MSC, MSC_TIMESTAMP);
}
- if (q && quirks_get_tuples(q, QUIRK_ATTR_EVENT_CODE_DISABLE, &t)) {
+ if (quirks_get_tuples(q, QUIRK_ATTR_EVENT_CODE_DISABLE, &t)) {
int type, code;
for (size_t i = 0; i < t->ntuples; i++) {
@@ -2107,7 +2107,6 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
}
quirks_unref(q);
-
}
static void
--
2.31.1

View File

@ -1,4 +1,4 @@
From d16e13645c11a4acdd6ed5f0bcbd486fcc2324f5 Mon Sep 17 00:00:00 2001
From 762da0ec8832a2b8dd0fd11ccb34603391c2893c Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 30 Mar 2022 09:25:22 +1000
Subject: [PATCH] evdev: strip the device name of format directives
@ -42,6 +42,7 @@ Fixes #752
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit a423d7d3269dc32a87384f79e29bb5ac021c83d1)
(cherry picked from commit 04f22107e1a2ead05401d9169fa4306e8c7eefad)
---
meson.build | 1 +
src/evdev.c | 31 +++++++++++------
@ -54,22 +55,22 @@ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
create mode 100644 test/litest-device-format-string.c
diff --git a/meson.build b/meson.build
index 040e3f1f..05e405fe 100644
index d6b06cca..a909ff19 100644
--- a/meson.build
+++ b/meson.build
@@ -776,6 +776,7 @@ if get_option('tests')
@@ -732,6 +732,7 @@ if get_option('tests')
'test/litest-device-dell-canvas-totem-touch.c',
'test/litest-device-elantech-touchpad.c',
'test/litest-device-elan-tablet.c',
+ 'test/litest-device-format-string.c',
'test/litest-device-generic-pressurepad.c',
'test/litest-device-generic-singletouch.c',
'test/litest-device-gpio-keys.c',
'test/litest-device-huion-pentablet.c',
diff --git a/src/evdev.c b/src/evdev.c
index 44d01711..3f674ba2 100644
index d8dfdadd..0b4b3590 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2218,19 +2218,19 @@ evdev_device_create(struct libinput_seat *seat,
@@ -2291,19 +2291,19 @@ evdev_device_create(struct libinput_seat *seat,
struct libinput *libinput = seat->libinput;
struct evdev_device *device = NULL;
int rc;
@ -93,7 +94,7 @@ index 44d01711..3f674ba2 100644
}
/* Use non-blocking mode so that we can loop on read on
@@ -2244,13 +2244,15 @@ evdev_device_create(struct libinput_seat *seat,
@@ -2317,13 +2317,15 @@ evdev_device_create(struct libinput_seat *seat,
sysname,
devnode,
strerror(-fd));
@ -110,7 +111,7 @@ index 44d01711..3f674ba2 100644
libinput_device_init(&device->base, seat);
libinput_seat_ref(seat);
@@ -2273,6 +2275,9 @@ evdev_device_create(struct libinput_seat *seat,
@@ -2346,6 +2348,9 @@ evdev_device_create(struct libinput_seat *seat,
device->dispatch = NULL;
device->fd = fd;
device->devname = libevdev_get_name(device->evdev);
@ -120,7 +121,7 @@ index 44d01711..3f674ba2 100644
device->scroll.threshold = 5.0; /* Default may be overridden */
device->scroll.direction_lock_threshold = 5.0; /* Default may be overridden */
device->scroll.direction = 0;
@@ -2313,12 +2318,16 @@ evdev_device_create(struct libinput_seat *seat,
@@ -2386,12 +2391,16 @@ evdev_device_create(struct libinput_seat *seat,
return device;
err:
@ -141,7 +142,7 @@ index 44d01711..3f674ba2 100644
return unhandled_device ? EVDEV_UNHANDLED_DEVICE : NULL;
}
@@ -2331,7 +2340,7 @@ evdev_device_get_output(struct evdev_device *device)
@@ -2404,7 +2413,7 @@ evdev_device_get_output(struct evdev_device *device)
const char *
evdev_device_get_sysname(struct evdev_device *device)
{
@ -150,7 +151,7 @@ index 44d01711..3f674ba2 100644
}
const char *
@@ -2909,6 +2918,8 @@ evdev_device_destroy(struct evdev_device *device)
@@ -3001,6 +3010,8 @@ evdev_device_destroy(struct evdev_device *device)
if (device->base.group)
libinput_device_group_unref(device->base.group);
@ -160,7 +161,7 @@ index 44d01711..3f674ba2 100644
filter_destroy(device->pointer.filter);
libinput_timer_destroy(&device->scroll.timer);
diff --git a/src/evdev.h b/src/evdev.h
index b0b1b8c6..785ba9ae 100644
index c7d130f8..980c5943 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -169,6 +169,8 @@ struct evdev_device {
@ -172,7 +173,7 @@ index b0b1b8c6..785ba9ae 100644
bool was_removed;
int fd;
enum evdev_device_seat_capability seat_caps;
@@ -770,7 +772,7 @@ evdev_log_msg(struct evdev_device *device,
@@ -786,7 +788,7 @@ evdev_log_msg(struct evdev_device *device,
sizeof(buf),
"%-7s - %s%s%s",
evdev_device_get_sysname(device),
@ -181,7 +182,7 @@ index b0b1b8c6..785ba9ae 100644
(priority > LIBINPUT_LOG_PRIORITY_DEBUG) ? ": " : "",
format);
@@ -805,7 +807,7 @@ evdev_log_msg_ratelimit(struct evdev_device *device,
@@ -824,7 +826,7 @@ evdev_log_msg_ratelimit(struct evdev_device *device,
sizeof(buf),
"%-7s - %s%s%s",
evdev_device_get_sysname(device),
@ -191,7 +192,7 @@ index b0b1b8c6..785ba9ae 100644
format);
diff --git a/src/util-strings.h b/src/util-strings.h
index 80e88aeb..5a0711d0 100644
index 2a15fab3..d5a84146 100644
--- a/src/util-strings.h
+++ b/src/util-strings.h
@@ -43,6 +43,8 @@
@ -200,13 +201,13 @@ index 80e88aeb..5a0711d0 100644
+#include "util-macros.h"
+
#define streq(s1, s2) (strcmp((s1), (s2)) == 0)
#define strneq(s1, s2, n) (strncmp((s1), (s2), (n)) == 0)
static inline bool
streq(const char *str1, const char *str2)
{
@@ -398,3 +400,31 @@ safe_basename(const char *filename);
@@ -376,3 +378,31 @@ strstartswith(const char *str, const char *prefix)
return prefixlen > 0 ? strneq(str, prefix, strlen(prefix)) : false;
}
char *
trunkname(const char *filename);
+
+/**
+ * Return a copy of str with all % converted to %% to make the string
@ -298,22 +299,22 @@ index 00000000..aed15db4
+ .events = events,
+)
diff --git a/test/litest.h b/test/litest.h
index 25dc9eed..8b6d1ea3 100644
index b6ffbf4e..c16670e7 100644
--- a/test/litest.h
+++ b/test/litest.h
@@ -307,6 +307,7 @@ enum litest_device_type {
LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE,
LITEST_SONY_VAIO_KEYS,
@@ -320,6 +320,7 @@ enum litest_device_type {
LITEST_KEYBOARD_QUIRKED,
LITEST_SYNAPTICS_PRESSUREPAD,
LITEST_GENERIC_PRESSUREPAD,
+ LITEST_MOUSE_FORMAT_STRING,
};
#define LITEST_DEVICELESS -2
diff --git a/test/test-utils.c b/test/test-utils.c
index 5955f56e..aa239092 100644
index 989adecd..e80754be 100644
--- a/test/test-utils.c
+++ b/test/test-utils.c
@@ -1196,6 +1196,31 @@ START_TEST(strstartswith_test)
@@ -1267,6 +1267,31 @@ START_TEST(strstartswith_test)
}
END_TEST
@ -345,7 +346,7 @@ index 5955f56e..aa239092 100644
START_TEST(list_test_insert)
{
struct list_test {
@@ -1305,6 +1330,7 @@ litest_utils_suite(void)
@@ -1489,6 +1514,7 @@ litest_utils_suite(void)
tcase_add_test(tc, strstrip_test);
tcase_add_test(tc, strendswith_test);
tcase_add_test(tc, strstartswith_test);

View File

@ -1,145 +0,0 @@
From 0e35c5baa7d0d0c15661a9f870ad5e58f06341b7 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 3 Nov 2020 15:22:53 +1000
Subject: [PATCH libinput 2/4] Revert "tools: switch measure-touchpad-pressure
to python-libevdev"
This reverts commit 33afe9f8756196e5a4df5fff33cb1344d5b6bc53.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
tools/libinput-measure-touchpad-pressure.py | 62 ++++++++++++---------
1 file changed, 35 insertions(+), 27 deletions(-)
diff --git a/tools/libinput-measure-touchpad-pressure.py b/tools/libinput-measure-touchpad-pressure.py
index a55bad0c..df958e4d 100755
--- a/tools/libinput-measure-touchpad-pressure.py
+++ b/tools/libinput-measure-touchpad-pressure.py
@@ -28,7 +28,8 @@ import sys
import subprocess
import argparse
try:
- import libevdev
+ import evdev
+ import evdev.ecodes
import pyudev
except ModuleNotFoundError as e:
print('Error: {}'.format(str(e)), file=sys.stderr)
@@ -177,33 +178,41 @@ class InvalidDeviceError(Exception):
pass
-class Device(libevdev.Device):
+class Device(object):
def __init__(self, path):
if path is None:
self.path = self.find_touchpad_device()
else:
self.path = path
- fd = open(self.path, 'rb')
- super().__init__(fd)
+ self.device = evdev.InputDevice(self.path)
- print("Using {}: {}\n".format(self.name, self.path))
+ print("Using {}: {}\n".format(self.device.name, self.path))
- self.has_mt_pressure = True
- absinfo = self.absinfo[libevdev.EV_ABS.ABS_MT_PRESSURE]
- if absinfo is None:
- absinfo = self.absinfo[libevdev.EV_ABS.ABS_PRESSURE]
- self.has_mt_pressure = False
- if absinfo is None:
+ # capabilities rturns a dict with the EV_* codes as key,
+ # each of which is a list of tuples of (code, AbsInfo)
+ #
+ # Get the abs list first (or empty list if missing),
+ # then extract the pressure absinfo from that
+ all_caps = self.device.capabilities(absinfo=True)
+ caps = all_caps.get(evdev.ecodes.EV_ABS, [])
+ p = [cap[1] for cap in caps if cap[0] == evdev.ecodes.ABS_MT_PRESSURE]
+ if not p:
+ p = [cap[1] for cap in caps if cap[0] == evdev.ecodes.ABS_PRESSURE]
+ if not p:
raise InvalidDeviceError("Device does not have ABS_PRESSURE or ABS_MT_PRESSURE")
+ self.has_mt_pressure = False
+ else:
+ self.has_mt_pressure = True
- prange = absinfo.maximum - absinfo.minimum
+ p = p[0]
+ prange = p.max - p.min
# libinput defaults
- self.down = int(absinfo.minimum + 0.12 * prange)
- self.up = int(absinfo.minimum + 0.10 * prange)
+ self.down = int(p.min + 0.12 * prange)
+ self.up = int(p.min + 0.10 * prange)
self.palm = 130 # the libinput default
- self.thumb = absinfo.maximum
+ self.thumb = p.max
self._init_thresholds_from_quirks()
self.sequences = []
@@ -249,10 +258,10 @@ class Device(libevdev.Device):
def handle_key(device, event):
tapcodes = [
- libevdev.EV_KEY.BTN_TOOL_DOUBLETAP,
- libevdev.EV_KEY.BTN_TOOL_TRIPLETAP,
- libevdev.EV_KEY.BTN_TOOL_QUADTAP,
- libevdev.EV_KEY.BTN_TOOL_QUINTTAP
+ evdev.ecodes.BTN_TOOL_DOUBLETAP,
+ evdev.ecodes.BTN_TOOL_TRIPLETAP,
+ evdev.ecodes.BTN_TOOL_QUADTAP,
+ evdev.ecodes.BTN_TOOL_QUINTTAP
]
if event.code in tapcodes and event.value > 0:
print('\r\033[2KThis tool cannot handle multiple fingers, '
@@ -260,7 +269,7 @@ def handle_key(device, event):
def handle_abs(device, event):
- if event.matches(libevdev.EV_ABS.ABS_MT_TRACKING_ID):
+ if event.code == evdev.ecodes.ABS_MT_TRACKING_ID:
if event.value > -1:
device.start_new_sequence(event.value)
else:
@@ -271,8 +280,8 @@ def handle_abs(device, event):
except IndexError:
# If the finger was down at startup
pass
- elif (event.matches(libevdev.EV_ABS.ABS_MT_PRESSURE) or
- (event.matches(libevdev.EV_ABS.ABS_PRESSURE) and not device.has_mt_pressure)):
+ elif ((event.code == evdev.ecodes.ABS_MT_PRESSURE) or
+ (event.code == evdev.ecodes.ABS_PRESSURE and not device.has_mt_pressure)):
try:
s = device.current_sequence()
s.append(Touch(pressure=event.value))
@@ -283,9 +292,9 @@ def handle_abs(device, event):
def handle_event(device, event):
- if event.matches(libevdev.EV_ABS):
+ if event.type == evdev.ecodes.EV_ABS:
handle_abs(device, event)
- elif event.matches(libevdev.EV_KEY):
+ elif event.type == evdev.ecodes.EV_KEY:
handle_key(device, event)
@@ -312,9 +321,8 @@ def loop(device):
print(headers)
print(fmt.separator())
- while True:
- for event in device.events():
- handle_event(device, event)
+ for event in device.device.read_loop():
+ handle_event(device, event)
def colon_tuple(string):
--
2.28.0

View File

@ -1,33 +0,0 @@
From 7a69cf4c04c86d1699d82486ca84d1892ad65e07 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 23 Oct 2020 12:54:54 +1000
Subject: [PATCH libinput 2/5] evdev: localize two variables during quirks
handling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 30502dee1e925c270429669c4acd293645c3cba3)
---
src/evdev.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index e6a00199..2f6c7447 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2084,11 +2084,9 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
}
if (quirks_get_tuples(q, QUIRK_ATTR_EVENT_CODE_DISABLE, &t)) {
- int type, code;
-
for (size_t i = 0; i < t->ntuples; i++) {
- type = t->tuples[i].first;
- code = t->tuples[i].second;
+ int type = t->tuples[i].first;
+ int code = t->tuples[i].second;
if (code == EVENT_CODE_UNDEFINED)
libevdev_disable_event_type(device->evdev,
--
2.31.1

View File

@ -0,0 +1,39 @@
From 5414d1395dec138d3daa39db886cc40bc3eae736 Mon Sep 17 00:00:00 2001
From: Charles Wang <charles.goodix@gmail.com>
Date: Wed, 11 Jan 2023 17:16:13 +0800
Subject: [PATCH] quirks: add quirks for Dell Precision5680 Touchpad
This touchpad is a pressure pad and needs the pressure
handling disable.
Fixes https://gitlab.freedesktop.org/libinput/libinput/-/issues/849
Signed-off-by: Charles Wang <charles.goodix@gmail.com>
Cherry-pick adjusted to work with the AttrEventCodeDisable quirk
(cherry picked from commit 29a49e968e67eb7bf6d63c9f93b06ee983772018)
(cherry picked from commit 6420178b5fdb5f9c5f353556703ae151891297fd)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
quirks/50-system-dell.quirks | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/quirks/50-system-dell.quirks b/quirks/50-system-dell.quirks
index 9bc3e357..cbd1fbcb 100644
--- a/quirks/50-system-dell.quirks
+++ b/quirks/50-system-dell.quirks
@@ -108,3 +108,11 @@ MatchBus=usb
MatchVendor=0x2575
MatchProduct=0x0204
ModelDellCanvasTotem=1
+
+# This is a true pressurepad so disable pressure for contact size
+# https://gitlab.freedesktop.org/libinput/libinput/-/issues/849
+[Dell Precision5680 Touchpad]
+MatchBus=i2c
+MatchVendor=0x27C6
+MatchProduct=0x0F60
+AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
--
2.39.0

View File

@ -1,149 +0,0 @@
From bf1dea1a8e516dd0372c2e7e3c818a05f3777a89 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 3 Nov 2020 15:24:23 +1000
Subject: [PATCH libinput 3/4] Revert "tools: switch measure-touch-size to
python-libevdev"
This reverts commit deb759a0699a0ad18a9fa3dda8f1b397e34ae537.
---
tools/libinput-measure-touch-size.py | 79 ++++++++++++++++------------
1 file changed, 44 insertions(+), 35 deletions(-)
diff --git a/tools/libinput-measure-touch-size.py b/tools/libinput-measure-touch-size.py
index 5d98bc28..f974df43 100755
--- a/tools/libinput-measure-touch-size.py
+++ b/tools/libinput-measure-touch-size.py
@@ -28,7 +28,8 @@ import sys
import subprocess
import argparse
try:
- import libevdev
+ import evdev
+ import evdev.ecodes
import pyudev
except ModuleNotFoundError as e:
print('Error: {}'.format(str(e)), file=sys.stderr)
@@ -171,23 +172,32 @@ class InvalidDeviceError(Exception):
pass
-class Device(libevdev.Device):
+class Device(object):
def __init__(self, path):
if path is None:
self.path = self.find_touch_device()
else:
self.path = path
- fd = open(self.path, 'rb')
- super().__init__(fd)
+ self.device = evdev.InputDevice(self.path)
- print("Using {}: {}\n".format(self.name, self.path))
+ print("Using {}: {}\n".format(self.device.name, self.path))
- if not self.has(libevdev.EV_ABS.ABS_MT_TOUCH_MAJOR):
+ # capabilities returns a dict with the EV_* codes as key,
+ # each of which is a list of tuples of (code, AbsInfo)
+ #
+ # Get the abs list first (or empty list if missing),
+ # then extract the touch major absinfo from that
+ caps = self.device.capabilities(absinfo=True).get(
+ evdev.ecodes.EV_ABS, []
+ )
+ codes = [cap[0] for cap in caps]
+
+ if evdev.ecodes.ABS_MT_TOUCH_MAJOR not in codes:
raise InvalidDeviceError("Device does not have ABS_MT_TOUCH_MAJOR")
- self.has_minor = self.has(libevdev.EV_ABS.ABS_MT_TOUCH_MINOR)
- self.has_orientation = self.has(libevdev.EV_ABS.ABS_MT_ORIENTATION)
+ self.has_minor = evdev.ecodes.ABS_MT_TOUCH_MINOR in codes
+ self.has_orientation = evdev.ecodes.ABS_MT_ORIENTATION in codes
self.up = 0
self.down = 0
@@ -239,32 +249,32 @@ class Device(libevdev.Device):
return self.sequences[-1]
def handle_key(self, event):
- tapcodes = [libevdev.EV_KEY.BTN_TOOL_DOUBLETAP,
- libevdev.EV_KEY.BTN_TOOL_TRIPLETAP,
- libevdev.EV_KEY.BTN_TOOL_QUADTAP,
- libevdev.EV_KEY.BTN_TOOL_QUINTTAP]
+ tapcodes = [evdev.ecodes.BTN_TOOL_DOUBLETAP,
+ evdev.ecodes.BTN_TOOL_TRIPLETAP,
+ evdev.ecodes.BTN_TOOL_QUADTAP,
+ evdev.ecodes.BTN_TOOL_QUINTTAP]
if event.code in tapcodes and event.value > 0:
print("\rThis tool cannot handle multiple fingers, "
"output will be invalid", file=sys.stderr)
def handle_abs(self, event):
- if event.matches(libevdev.EV_ABS.ABS_MT_TRACKING_ID):
- if event.value > -1:
- self.start_new_sequence(event.value)
- else:
- try:
- s = self.current_sequence()
- s.finalize()
- print("\r{}".format(s))
- except IndexError:
- # If the finger was down during start
- pass
- elif event.matches(libevdev.EV_ABS.ABS_MT_TOUCH_MAJOR):
- self.touch.major = event.value
- elif event.matches(libevdev.EV_ABS.ABS_MT_TOUCH_MINOR):
- self.touch.minor = event.value
- elif event.matches(libevdev.EV_ABS.ABS_MT_ORIENTATION):
- self.touch.orientation = event.value
+ if event.code == evdev.ecodes.ABS_MT_TRACKING_ID:
+ if event.value > -1:
+ self.start_new_sequence(event.value)
+ else:
+ try:
+ s = self.current_sequence()
+ s.finalize()
+ print("\r{}".format(s))
+ except IndexError:
+ # If the finger was down during start
+ pass
+ elif event.code == evdev.ecodes.ABS_MT_TOUCH_MAJOR:
+ self.touch.major = event.value
+ elif event.code == evdev.ecodes.ABS_MT_TOUCH_MINOR:
+ self.touch.minor = event.value
+ elif event.code == evdev.ecodes.ABS_MT_ORIENTATION:
+ self.touch.orientation = event.value
def handle_syn(self, event):
if self.touch.dirty:
@@ -278,11 +288,11 @@ class Device(libevdev.Device):
pass
def handle_event(self, event):
- if event.matches(libevdev.EV_ABS):
+ if event.type == evdev.ecodes.EV_ABS:
self.handle_abs(event)
- elif event.matches(libevdev.EV_KEY):
+ elif event.type == evdev.ecodes.EV_KEY:
self.handle_key(event)
- elif event.matches(libevdev.EV_SYN):
+ elif event.type == evdev.ecodes.EV_SYN:
self.handle_syn(event)
def read_events(self):
@@ -293,9 +303,8 @@ class Device(libevdev.Device):
print("Place a single finger on the device to measure touch size.\n"
"Ctrl+C to exit\n")
- while True:
- for event in self.events():
- self.handle_event(event)
+ for event in self.device.read_loop():
+ self.handle_event(event)
def colon_tuple(string):
--
2.28.0

View File

@ -0,0 +1,28 @@
From 6dc3b6ace421ab7862a30074a5842cc99637b171 Mon Sep 17 00:00:00 2001
From: Marge Yang <marge.yang@synaptics.corp-partner.google.com>
Date: Wed, 8 Feb 2023 01:24:53 -0500
Subject: [PATCH] quirks: Dell Mayabay (Pressure Pad).
Signed-off-by: Marge Yang <marge.yang@synaptics.corp-partner.google.com>
(cherry picked from commit 74415b13fb72c457e5439c974f59e1b0d08a27ed)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
quirks/50-system-dell.quirks | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/quirks/50-system-dell.quirks b/quirks/50-system-dell.quirks
index cbd1fbcb..0fb43aac 100644
--- a/quirks/50-system-dell.quirks
+++ b/quirks/50-system-dell.quirks
@@ -116,3 +116,9 @@ MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F60
AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
+
+[Dell Mayabay Touchpad]
+MatchBus=i2c
+MatchVendor=0x06CB
+MatchProduct=0xCFA0
+AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
--
2.41.0

View File

@ -1,488 +0,0 @@
From ec0c4a65e00302c193a36c56a7f2f021c43bf183 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 23 Oct 2020 09:14:33 +1000
Subject: [PATCH libinput 3/5] quirks: add AttrEventCodeEnable as counterpoint
to the disable one
Currently unused, but let's get this in because we may need this very soon for
broken tablets.
Enabling EV_ABS axes requires an absinfo struct - we default to a simple 0-1
axis range for those as the most generic option. Anything more custom will
need more custom treatment when we need it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit e3c4ff38984dfb4b51c245032c4aff5169d15257)
---
doc/user/device-quirks.rst | 4 +
meson.build | 1 +
src/evdev.c | 26 ++++
src/quirks.c | 10 +-
src/quirks.h | 1 +
src/util-strings.h | 12 ++
test/litest-device-keyboard-quirked.c | 216 ++++++++++++++++++++++++++
test/litest.h | 1 +
test/test-device.c | 76 +++++++++
9 files changed, 345 insertions(+), 2 deletions(-)
create mode 100644 test/litest-device-keyboard-quirked.c
diff --git a/doc/user/device-quirks.rst b/doc/user/device-quirks.rst
index 0a055a35..21c43e1c 100644
--- a/doc/user/device-quirks.rst
+++ b/doc/user/device-quirks.rst
@@ -177,6 +177,10 @@ AttrEventCodeDisable=EV_ABS;BTN_STYLUS;EV_KEY:0x123;
Disables the evdev event type/code tuples on the device. Entries may be
a named event type, or a named event code, or a named event type with a
hexadecimal event code, separated by a single colon.
+AttrEventCodeEnable=EV_ABS;BTN_STYLUS;EV_KEY:0x123;
+ Enables the evdev event type/code tuples on the device. Entries may be
+ a named event type, or a named event code, or a named event type with a
+ hexadecimal event code, separated by a single colon.
AttrPointingStickIntegration=internal|external
Indicates the integration of the pointing stick. This is a string enum.
Only needed for external pointing sticks. These are rare.
diff --git a/meson.build b/meson.build
index c9b53a3b..0481fa10 100644
--- a/meson.build
+++ b/meson.build
@@ -780,6 +780,7 @@ if get_option('tests')
'test/litest-device-ignored-mouse.c',
'test/litest-device-keyboard.c',
'test/litest-device-keyboard-all-codes.c',
+ 'test/litest-device-keyboard-quirked.c',
'test/litest-device-keyboard-razer-blackwidow.c',
'test/litest-device-keyboard-razer-blade-stealth.c',
'test/litest-device-keyboard-razer-blade-stealth-videoswitch.c',
diff --git a/src/evdev.c b/src/evdev.c
index 2f6c7447..4bcd3066 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2083,6 +2083,32 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
libevdev_disable_event_code(device->evdev, EV_MSC, MSC_TIMESTAMP);
}
+ if (quirks_get_tuples(q, QUIRK_ATTR_EVENT_CODE_ENABLE, &t)) {
+ for (size_t i = 0; i < t->ntuples; i++) {
+ const struct input_absinfo absinfo = {
+ .minimum = 0,
+ .maximum = 1,
+ };
+
+ int type = t->tuples[i].first;
+ int code = t->tuples[i].second;
+
+ if (code == EVENT_CODE_UNDEFINED)
+ libevdev_enable_event_type(device->evdev, type);
+ else
+ libevdev_enable_event_code(device->evdev,
+ type,
+ code,
+ type == EV_ABS ? &absinfo : NULL);
+ evdev_log_debug(device,
+ "quirks: enabling %s %s (%#x %#x)\n",
+ libevdev_event_type_get_name(type),
+ libevdev_event_code_get_name(type, code),
+ type,
+ code);
+ }
+ }
+
if (quirks_get_tuples(q, QUIRK_ATTR_EVENT_CODE_DISABLE, &t)) {
for (size_t i = 0; i < t->ntuples; i++) {
int type = t->tuples[i].first;
diff --git a/src/quirks.c b/src/quirks.c
index 45d1f554..69f41fde 100644
--- a/src/quirks.c
+++ b/src/quirks.c
@@ -273,6 +273,7 @@ quirk_get_name(enum quirk q)
case QUIRK_ATTR_THUMB_SIZE_THRESHOLD: return "AttrThumbSizeThreshold";
case QUIRK_ATTR_MSC_TIMESTAMP: return "AttrMscTimestamp";
case QUIRK_ATTR_EVENT_CODE_DISABLE: return "AttrEventCodeDisable";
+ case QUIRK_ATTR_EVENT_CODE_ENABLE: return "AttrEventCodeEnable";
default:
abort();
}
@@ -737,10 +738,15 @@ parse_attr(struct quirks_context *ctx,
p->type = PT_STRING;
p->value.s = safe_strdup(value);
rc = true;
- } else if (streq(key, quirk_get_name(QUIRK_ATTR_EVENT_CODE_DISABLE))) {
+ } else if (streq(key, quirk_get_name(QUIRK_ATTR_EVENT_CODE_DISABLE)) ||
+ streq(key, quirk_get_name(QUIRK_ATTR_EVENT_CODE_ENABLE))) {
struct input_event events[32];
size_t nevents = ARRAY_LENGTH(events);
- p->id = QUIRK_ATTR_EVENT_CODE_DISABLE;
+ if (streq(key, quirk_get_name(QUIRK_ATTR_EVENT_CODE_DISABLE)))
+ p->id = QUIRK_ATTR_EVENT_CODE_DISABLE;
+ else
+ p->id = QUIRK_ATTR_EVENT_CODE_ENABLE;
+
if (!parse_evcode_property(value, events, &nevents) ||
nevents == 0)
goto out;
diff --git a/src/quirks.h b/src/quirks.h
index ee85fe3b..0b2fe9f3 100644
--- a/src/quirks.h
+++ b/src/quirks.h
@@ -109,6 +109,7 @@ enum quirk {
QUIRK_ATTR_THUMB_SIZE_THRESHOLD,
QUIRK_ATTR_MSC_TIMESTAMP,
QUIRK_ATTR_EVENT_CODE_DISABLE,
+ QUIRK_ATTR_EVENT_CODE_ENABLE,
_QUIRK_LAST_ATTR_QUIRK_, /* Guard: do not modify */
};
diff --git a/src/util-strings.h b/src/util-strings.h
index 2c31ff80..80e88aeb 100644
--- a/src/util-strings.h
+++ b/src/util-strings.h
@@ -111,6 +111,18 @@ xasprintf(char **strp, const char *fmt, ...)
return rc;
}
+__attribute__ ((format (printf, 2, 0)))
+static inline int
+xvasprintf(char **strp, const char *fmt, va_list args)
+{
+ int rc = 0;
+ rc = vasprintf(strp, fmt, args);
+ if ((rc == -1) && strp)
+ *strp = NULL;
+
+ return rc;
+}
+
static inline bool
safe_atoi_base(const char *str, int *val, int base)
{
diff --git a/test/litest-device-keyboard-quirked.c b/test/litest-device-keyboard-quirked.c
new file mode 100644
index 00000000..748794b2
--- /dev/null
+++ b/test/litest-device-keyboard-quirked.c
@@ -0,0 +1,216 @@
+/*
+ * Copyright © 2013 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "config.h"
+
+#include "litest.h"
+#include "litest-int.h"
+
+static struct input_id input_id = {
+ .bustype = 0x11,
+ .vendor = 0x1,
+ .product = 0x1,
+};
+
+static int events[] = {
+ EV_REL, REL_X,
+ EV_REL, REL_Y,
+
+ EV_KEY, KEY_ESC,
+ EV_KEY, KEY_1,
+ EV_KEY, KEY_2,
+ EV_KEY, KEY_3,
+ EV_KEY, KEY_4,
+ EV_KEY, KEY_5,
+ EV_KEY, KEY_6,
+ EV_KEY, KEY_7,
+ EV_KEY, KEY_8,
+ EV_KEY, KEY_9,
+ EV_KEY, KEY_0,
+ EV_KEY, KEY_MINUS,
+ EV_KEY, KEY_EQUAL,
+ EV_KEY, KEY_BACKSPACE,
+ EV_KEY, KEY_TAB,
+ EV_KEY, KEY_Q,
+ EV_KEY, KEY_W,
+ EV_KEY, KEY_E,
+ EV_KEY, KEY_R,
+ EV_KEY, KEY_T,
+ EV_KEY, KEY_Y,
+ EV_KEY, KEY_U,
+ EV_KEY, KEY_I,
+ EV_KEY, KEY_O,
+ EV_KEY, KEY_P,
+ EV_KEY, KEY_LEFTBRACE,
+ EV_KEY, KEY_RIGHTBRACE,
+ EV_KEY, KEY_ENTER,
+ EV_KEY, KEY_LEFTCTRL,
+ EV_KEY, KEY_A,
+ EV_KEY, KEY_S,
+ EV_KEY, KEY_D,
+ EV_KEY, KEY_F,
+ EV_KEY, KEY_G,
+ EV_KEY, KEY_H,
+ EV_KEY, KEY_J,
+ EV_KEY, KEY_K,
+ EV_KEY, KEY_L,
+ EV_KEY, KEY_SEMICOLON,
+ EV_KEY, KEY_APOSTROPHE,
+ EV_KEY, KEY_GRAVE,
+ EV_KEY, KEY_LEFTSHIFT,
+ EV_KEY, KEY_BACKSLASH,
+ EV_KEY, KEY_Z,
+ EV_KEY, KEY_X,
+ EV_KEY, KEY_C,
+ EV_KEY, KEY_V,
+ EV_KEY, KEY_B,
+ EV_KEY, KEY_N,
+ EV_KEY, KEY_M,
+ EV_KEY, KEY_COMMA,
+ EV_KEY, KEY_DOT,
+ EV_KEY, KEY_SLASH,
+ EV_KEY, KEY_RIGHTSHIFT,
+ EV_KEY, KEY_KPASTERISK,
+ EV_KEY, KEY_LEFTALT,
+ EV_KEY, KEY_SPACE,
+ EV_KEY, KEY_CAPSLOCK,
+ EV_KEY, KEY_F1,
+ EV_KEY, KEY_F2,
+ EV_KEY, KEY_F3,
+ EV_KEY, KEY_F4,
+ EV_KEY, KEY_F5,
+ EV_KEY, KEY_F6,
+ EV_KEY, KEY_F7,
+ EV_KEY, KEY_F8,
+ EV_KEY, KEY_F9,
+ EV_KEY, KEY_F10,
+ EV_KEY, KEY_NUMLOCK,
+ EV_KEY, KEY_SCROLLLOCK,
+ EV_KEY, KEY_KP7,
+ EV_KEY, KEY_KP8,
+ EV_KEY, KEY_KP9,
+ EV_KEY, KEY_KPMINUS,
+ EV_KEY, KEY_KP4,
+ EV_KEY, KEY_KP5,
+ EV_KEY, KEY_KP6,
+ EV_KEY, KEY_KPPLUS,
+ EV_KEY, KEY_KP1,
+ EV_KEY, KEY_KP2,
+ EV_KEY, KEY_KP3,
+ EV_KEY, KEY_KP0,
+ EV_KEY, KEY_KPDOT,
+ EV_KEY, KEY_ZENKAKUHANKAKU,
+ EV_KEY, KEY_102ND,
+ EV_KEY, KEY_F11,
+ EV_KEY, KEY_F12,
+ EV_KEY, KEY_RO,
+ EV_KEY, KEY_KATAKANA,
+ EV_KEY, KEY_HIRAGANA,
+ EV_KEY, KEY_HENKAN,
+ EV_KEY, KEY_KATAKANAHIRAGANA,
+ EV_KEY, KEY_MUHENKAN,
+ EV_KEY, KEY_KPJPCOMMA,
+ EV_KEY, KEY_KPENTER,
+ EV_KEY, KEY_RIGHTCTRL,
+ EV_KEY, KEY_KPSLASH,
+ EV_KEY, KEY_SYSRQ,
+ EV_KEY, KEY_RIGHTALT,
+ EV_KEY, KEY_LINEFEED,
+ EV_KEY, KEY_HOME,
+ EV_KEY, KEY_UP,
+ EV_KEY, KEY_PAGEUP,
+ EV_KEY, KEY_LEFT,
+ EV_KEY, KEY_RIGHT,
+ EV_KEY, KEY_END,
+ EV_KEY, KEY_DOWN,
+ EV_KEY, KEY_PAGEDOWN,
+ EV_KEY, KEY_INSERT,
+ EV_KEY, KEY_DELETE,
+ EV_KEY, KEY_MACRO,
+ EV_KEY, KEY_MUTE,
+ EV_KEY, KEY_VOLUMEDOWN,
+ EV_KEY, KEY_VOLUMEUP,
+ EV_KEY, KEY_POWER,
+ EV_KEY, KEY_KPEQUAL,
+ EV_KEY, KEY_KPPLUSMINUS,
+ EV_KEY, KEY_PAUSE,
+ /* EV_KEY, KEY_SCALE, */
+ EV_KEY, KEY_KPCOMMA,
+ EV_KEY, KEY_HANGEUL,
+ EV_KEY, KEY_HANJA,
+ EV_KEY, KEY_YEN,
+ EV_KEY, KEY_LEFTMETA,
+ EV_KEY, KEY_RIGHTMETA,
+ EV_KEY, KEY_COMPOSE,
+ EV_KEY, KEY_STOP,
+
+ EV_KEY, KEY_MENU,
+ EV_KEY, KEY_CALC,
+ EV_KEY, KEY_SETUP,
+ EV_KEY, KEY_SLEEP,
+ EV_KEY, KEY_WAKEUP,
+ EV_KEY, KEY_SCREENLOCK,
+ EV_KEY, KEY_DIRECTION,
+ EV_KEY, KEY_CYCLEWINDOWS,
+ EV_KEY, KEY_MAIL,
+ EV_KEY, KEY_BOOKMARKS,
+ EV_KEY, KEY_COMPUTER,
+ EV_KEY, KEY_BACK,
+ EV_KEY, KEY_FORWARD,
+ EV_KEY, KEY_NEXTSONG,
+ EV_KEY, KEY_PLAYPAUSE,
+ EV_KEY, KEY_PREVIOUSSONG,
+ EV_KEY, KEY_STOPCD,
+ EV_KEY, KEY_HOMEPAGE,
+ EV_KEY, KEY_REFRESH,
+ EV_KEY, KEY_F14,
+ EV_KEY, KEY_F15,
+ EV_KEY, KEY_SEARCH,
+ EV_KEY, KEY_MEDIA,
+ EV_KEY, KEY_FN,
+ EV_LED, LED_NUML,
+ EV_LED, LED_CAPSL,
+ EV_LED, LED_SCROLLL,
+ -1, -1,
+};
+
+static const char quirk_file[] =
+"[litest Quirked Keyboard enable rel]\n"
+"MatchName=litest Quirked Keyboard\n"
+"AttrEventCodeEnable=BTN_RIGHT;EV_KEY:0x110\n" /* BTN_LEFT */
+"\n"
+"[litest Quirked keyboard disable F1-F3]\n"
+"MatchName=litest Quirked Keyboard\n"
+"AttrEventCodeDisable=KEY_F1;EV_KEY:0x3c;KEY_F3\n";
+
+TEST_DEVICE("keyboard-quirked",
+ .type = LITEST_KEYBOARD_QUIRKED,
+ .features = LITEST_KEYS | LITEST_IGNORED, /* Only use this keyboard in specific tests */
+ .interface = NULL,
+
+ .name = "Quirked Keyboard",
+ .id = &input_id,
+ .events = events,
+ .absinfo = NULL,
+ .quirk_file = quirk_file,
+)
diff --git a/test/litest.h b/test/litest.h
index 1f4e609d..25dc9eed 100644
--- a/test/litest.h
+++ b/test/litest.h
@@ -306,6 +306,7 @@ enum litest_device_type {
LITEST_TABLET_MODE_UNRELIABLE,
LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE,
LITEST_SONY_VAIO_KEYS,
+ LITEST_KEYBOARD_QUIRKED,
};
#define LITEST_DEVICELESS -2
diff --git a/test/test-device.c b/test/test-device.c
index 3a4a6b57..a50372d4 100644
--- a/test/test-device.c
+++ b/test/test-device.c
@@ -1419,6 +1419,81 @@ START_TEST(device_quirks_logitech_marble_mouse)
}
END_TEST
+char *debug_messages[64] = { NULL };
+
+static void
+debug_log_handler(struct libinput *libinput,
+ enum libinput_log_priority priority,
+ const char *format,
+ va_list args)
+{
+ char *message;
+ int n;
+
+ if (priority != LIBINPUT_LOG_PRIORITY_DEBUG)
+ return;
+
+ n = xvasprintf(&message, format, args);
+ litest_assert_int_gt(n, 0);
+
+ for (size_t idx = 0; idx < ARRAY_LENGTH(debug_messages); idx++) {
+ if (debug_messages[idx] == NULL) {
+ debug_messages[idx] = message;
+ return;
+ }
+ }
+
+ litest_abort_msg("Out of space for debug messages");
+}
+
+START_TEST(device_quirks)
+{
+ struct libinput *li;
+ struct litest_device *dev;
+ struct libinput_device *device;
+ char **message;
+ bool disable_key_f1 = false,
+ enable_btn_left = false;
+
+ li = litest_create_context();
+ libinput_log_set_priority(li, LIBINPUT_LOG_PRIORITY_DEBUG);
+ libinput_log_set_handler(li, debug_log_handler);
+ dev = litest_add_device(li, LITEST_KEYBOARD_QUIRKED);
+ device = dev->libinput_device;
+
+ ck_assert(libinput_device_pointer_has_button(device,
+ BTN_LEFT));
+ ck_assert(libinput_device_pointer_has_button(dev->libinput_device,
+ BTN_RIGHT));
+ ck_assert(!libinput_device_keyboard_has_key(dev->libinput_device,
+ KEY_F1));
+ ck_assert(!libinput_device_keyboard_has_key(dev->libinput_device,
+ KEY_F2));
+ ck_assert(!libinput_device_keyboard_has_key(dev->libinput_device,
+ KEY_F3));
+
+ /* Scrape the debug messages for confirmation that our quirks are
+ * triggered, the above checks cannot work non-key codes */
+ message = debug_messages;
+ while (*message) {
+ if (strstr(*message, "disabling EV_KEY KEY_F1"))
+ disable_key_f1 = true;
+ if (strstr(*message, "enabling EV_KEY BTN_LEFT"))
+ enable_btn_left = true;
+
+ message++;
+ }
+
+ ck_assert(disable_key_f1);
+ ck_assert(enable_btn_left);
+
+ litest_disable_log_handler(li);
+
+ litest_delete_device(dev);
+ litest_destroy_context(li);
+}
+END_TEST
+
START_TEST(device_capability_at_least_one)
{
struct litest_device *dev = litest_current_device();
@@ -1670,6 +1745,7 @@ TEST_COLLECTION(device)
litest_add_for_device("device:quirks", device_quirks_cyborg_rat_mode_button, LITEST_CYBORG_RAT);
litest_add_for_device("device:quirks", device_quirks_apple_magicmouse, LITEST_MAGICMOUSE);
litest_add_for_device("device:quirks", device_quirks_logitech_marble_mouse, LITEST_LOGITECH_TRACKBALL);
+ litest_add_no_device("device:quirks", device_quirks);
litest_add("device:capability", device_capability_at_least_one, LITEST_ANY, LITEST_ANY);
litest_add("device:capability", device_capability_check_invalid, LITEST_ANY, LITEST_ANY);
--
2.31.1

View File

@ -1,90 +0,0 @@
From 2f294e771a5e9cdeedff4627905634b9daac9bec Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 3 Nov 2020 15:30:18 +1000
Subject: [PATCH libinput 4/4] Revert "tools: switch measure-fuzz to use
python-libevdev"
This reverts commit 795c08eb44fca078fa9935fdc5b8482bb7b43413.
---
tools/libinput-measure-fuzz.py | 40 ++++++++++++++++++++++++----------
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/tools/libinput-measure-fuzz.py b/tools/libinput-measure-fuzz.py
index c392d74a..f539fe23 100755
--- a/tools/libinput-measure-fuzz.py
+++ b/tools/libinput-measure-fuzz.py
@@ -29,7 +29,8 @@ import sys
import argparse
import subprocess
try:
- import libevdev
+ import evdev
+ import evdev.ecodes
import pyudev
except ModuleNotFoundError as e:
print('Error: {}'.format(str(e)), file=sys.stderr)
@@ -74,15 +75,15 @@ class InvalidDeviceError(Exception):
pass
-class Device(libevdev.Device):
+class Device(object):
def __init__(self, path):
if path is None:
self.path = self.find_touch_device()
else:
self.path = path
- fd = open(self.path, 'rb')
- super().__init__(fd)
+ self.device = evdev.InputDevice(self.path)
+ self.name = self.device.name
context = pyudev.Context()
self.udev_device = pyudev.Devices.from_device_file(context, self.path)
@@ -137,18 +138,35 @@ class Device(libevdev.Device):
Returns a tuple of (xfuzz, yfuzz) with the fuzz as set on the device
axis. Returns None if no fuzz is set.
'''
- if not self.has(libevdev.EV_ABS.ABS_X) or not self.has(libevdev.EV_ABS.ABS_Y):
+ # capabilities returns a dict with the EV_* codes as key,
+ # each of which is a list of tuples of (code, AbsInfo)
+ #
+ # Get the abs list first (or empty list if missing),
+ # then extract the touch major absinfo from that
+ caps = self.device.capabilities(absinfo=True).get(evdev.ecodes.EV_ABS, [])
+ codes = [cap[0] for cap in caps]
+
+ if evdev.ecodes.ABS_X not in codes or evdev.ecodes.ABS_Y not in codes:
raise InvalidDeviceError('device does not have x/y axes')
- if self.has(libevdev.EV_ABS.ABS_MT_POSITION_X) != self.has(libevdev.EV_ABS.ABS_MT_POSITION_Y):
+ if (evdev.ecodes.ABS_MT_POSITION_X in codes) != (evdev.ecodes.ABS_MT_POSITION_Y in codes):
raise InvalidDeviceError('device does not have both multitouch axes')
- xfuzz = (self.absinfo[libevdev.EV_ABS.ABS_X].fuzz or
- self.absinfo[libevdev.EV_ABS.ABS_MT_POSITION_X].fuzz)
- yfuzz = (self.absinfo[libevdev.EV_ABS.ABS_Y].fuzz or
- self.absinfo[libevdev.EV_ABS.ABS_MT_POSITION_Y].fuzz)
+ axes = {
+ 0x00: None,
+ 0x01: None,
+ 0x35: None,
+ 0x36: None,
+ }
- if xfuzz == 0 and yfuzz == 0:
+ for c in caps:
+ if c[0] in axes.keys():
+ axes[c[0]] = c[1].fuzz
+
+ xfuzz = axes[0x35] or axes[0x00]
+ yfuzz = axes[0x36] or axes[0x01]
+
+ if xfuzz is None and yfuzz is None:
return None
return (xfuzz, yfuzz)
--
2.28.0

View File

@ -1,447 +0,0 @@
From ea835c0f9a3cf8b599ea63f1057ee8cdb997db95 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 23 Oct 2020 10:38:14 +1000
Subject: [PATCH libinput 4/5] quirks: add AttrInputPropEnable and Disable
The latter requires libevdev 1.10 but since that'll take a while to filter
into our various CI systems, let's make it conditional.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit e882bd02167a9e2ca1c26c104026a8b29bf23ffa)
---
doc/user/device-quirks.rst | 6 +++
meson.build | 3 ++
src/evdev.c | 35 ++++++++++++++++
src/quirks.c | 51 ++++++++++++++++++++++++
src/quirks.h | 16 ++++++++
src/util-prop-parsers.c | 57 +++++++++++++++++++++++++++
src/util-prop-parsers.h | 1 +
test/litest-device-keyboard-quirked.c | 17 +++++++-
test/test-device.c | 16 +++++++-
test/test-utils.c | 47 ++++++++++++++++++++++
10 files changed, 247 insertions(+), 2 deletions(-)
diff --git a/doc/user/device-quirks.rst b/doc/user/device-quirks.rst
index 21c43e1c..faaea47f 100644
--- a/doc/user/device-quirks.rst
+++ b/doc/user/device-quirks.rst
@@ -181,6 +181,12 @@ AttrEventCodeEnable=EV_ABS;BTN_STYLUS;EV_KEY:0x123;
Enables the evdev event type/code tuples on the device. Entries may be
a named event type, or a named event code, or a named event type with a
hexadecimal event code, separated by a single colon.
+AttrInputPropDisable=INPUT_PROP_BUTTONPAD;INPUT_PROP_POINTER;
+ Disables the evdev input property on the device. Entries may be
+ a named input property or the hexadecimal value of that property.
+AttrInputPropEnable=INPUT_PROP_BUTTONPAD;INPUT_PROP_POINTER;
+ Enables the evdev input property on the device. Entries may be
+ a named input property or the hexadecimal value of that property.
AttrPointingStickIntegration=internal|external
Indicates the integration of the pointing stick. This is a string enum.
Only needed for external pointing sticks. These are rare.
diff --git a/meson.build b/meson.build
index 0481fa10..040e3f1f 100644
--- a/meson.build
+++ b/meson.build
@@ -125,6 +125,9 @@ pkgconfig = import('pkgconfig')
dep_udev = dependency('libudev')
dep_mtdev = dependency('mtdev', version : '>= 1.1.0')
dep_libevdev = dependency('libevdev')
+config_h.set10('HAVE_LIBEVDEV_DISABLE_PROPERTY',
+ dep_libevdev.version().version_compare('>= 1.9.902'))
+
dep_lm = cc.find_library('m', required : false)
dep_rt = cc.find_library('rt', required : false)
diff --git a/src/evdev.c b/src/evdev.c
index 4bcd3066..44d01711 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2050,6 +2050,8 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
struct quirks_context *quirks;
struct quirks *q;
const struct quirk_tuples *t;
+ const uint32_t *props = NULL;
+ size_t nprops = 0;
char *prop;
/* Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
@@ -2130,6 +2132,39 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
}
}
+ if (quirks_get_uint32_array(q,
+ QUIRK_ATTR_INPUT_PROP_ENABLE,
+ &props,
+ &nprops)) {
+ for (size_t idx = 0; idx < nprops; idx++) {
+ unsigned int p = props[idx];
+ libevdev_enable_property(device->evdev, p);
+ evdev_log_debug(device,
+ "quirks: enabling %s (%#x)\n",
+ libevdev_property_get_name(p),
+ p);
+ }
+ }
+
+ if (quirks_get_uint32_array(q,
+ QUIRK_ATTR_INPUT_PROP_DISABLE,
+ &props,
+ &nprops)) {
+#if HAVE_LIBEVDEV_DISABLE_PROPERTY
+ for (size_t idx = 0; idx < nprops; idx++) {
+ unsigned int p = props[idx];
+ libevdev_disable_property(device->evdev, p);
+ evdev_log_debug(device,
+ "quirks: disabling %s (%#x)\n",
+ libevdev_property_get_name(p),
+ p);
+ }
+#else
+ evdev_log_error(device,
+ "quirks: a quirk for this device requires newer libevdev than installed\n");
+#endif
+ }
+
quirks_unref(q);
}
diff --git a/src/quirks.c b/src/quirks.c
index 69f41fde..4a49154f 100644
--- a/src/quirks.c
+++ b/src/quirks.c
@@ -57,6 +57,14 @@ enum property_type {
PT_RANGE,
PT_DOUBLE,
PT_TUPLES,
+ PT_UINT_ARRAY,
+};
+
+struct quirk_array {
+ union {
+ uint32_t u[32];
+ } data;
+ size_t nelements;
};
/**
@@ -79,6 +87,7 @@ struct property {
struct quirk_dimensions dim;
struct quirk_range range;
struct quirk_tuples tuples;
+ struct quirk_array array;
} value;
};
@@ -274,6 +283,8 @@ quirk_get_name(enum quirk q)
case QUIRK_ATTR_MSC_TIMESTAMP: return "AttrMscTimestamp";
case QUIRK_ATTR_EVENT_CODE_DISABLE: return "AttrEventCodeDisable";
case QUIRK_ATTR_EVENT_CODE_ENABLE: return "AttrEventCodeEnable";
+ case QUIRK_ATTR_INPUT_PROP_DISABLE: return "AttrInputPropDisable";
+ case QUIRK_ATTR_INPUT_PROP_ENABLE: return "AttrInputPropEnable";
default:
abort();
}
@@ -758,6 +769,24 @@ parse_attr(struct quirks_context *ctx,
p->value.tuples.ntuples = nevents;
p->type = PT_TUPLES;
+ rc = true;
+ } else if (streq(key, quirk_get_name(QUIRK_ATTR_INPUT_PROP_DISABLE)) ||
+ streq(key, quirk_get_name(QUIRK_ATTR_INPUT_PROP_ENABLE))) {
+ unsigned int props[INPUT_PROP_CNT];
+ size_t nprops = ARRAY_LENGTH(props);
+ if (streq(key, quirk_get_name(QUIRK_ATTR_INPUT_PROP_DISABLE)))
+ p->id = QUIRK_ATTR_INPUT_PROP_DISABLE;
+ else
+ p->id = QUIRK_ATTR_INPUT_PROP_ENABLE;
+
+ if (!parse_input_prop_property(value, props, &nprops) ||
+ nprops == 0)
+ goto out;
+
+ memcpy(p->value.array.data.u, props, nprops * sizeof(unsigned int));
+ p->value.array.nelements = nprops;
+ p->type = PT_UINT_ARRAY;
+
rc = true;
} else {
qlog_error(ctx, "Unknown key %s in %s\n", key, s->name);
@@ -1589,3 +1618,25 @@ quirks_get_tuples(struct quirks *q,
return true;
}
+
+bool
+quirks_get_uint32_array(struct quirks *q,
+ enum quirk which,
+ const uint32_t **array,
+ size_t *nelements)
+{
+ struct property *p;
+
+ if (!q)
+ return false;
+
+ p = quirk_find_prop(q, which);
+ if (!p)
+ return false;
+
+ assert(p->type == PT_UINT_ARRAY);
+ *array = p->value.array.data.u;
+ *nelements = p->value.array.nelements;
+
+ return true;
+}
diff --git a/src/quirks.h b/src/quirks.h
index 0b2fe9f3..4f2c6a8c 100644
--- a/src/quirks.h
+++ b/src/quirks.h
@@ -110,6 +110,8 @@ enum quirk {
QUIRK_ATTR_MSC_TIMESTAMP,
QUIRK_ATTR_EVENT_CODE_DISABLE,
QUIRK_ATTR_EVENT_CODE_ENABLE,
+ QUIRK_ATTR_INPUT_PROP_DISABLE,
+ QUIRK_ATTR_INPUT_PROP_ENABLE,
_QUIRK_LAST_ATTR_QUIRK_, /* Guard: do not modify */
};
@@ -313,3 +315,17 @@ bool
quirks_get_tuples(struct quirks *q,
enum quirk which,
const struct quirk_tuples **tuples);
+
+/**
+ * Get the uint32 array of the given quirk.
+ * This function will assert if the quirk type does not match the
+ * requested type. If the quirk is not set for this device, tuples is
+ * unchanged.
+ *
+ * @return true if the quirk value is valid, false otherwise.
+ */
+bool
+quirks_get_uint32_array(struct quirks *q,
+ enum quirk which,
+ const uint32_t **array,
+ size_t *nelements);
diff --git a/src/util-prop-parsers.c b/src/util-prop-parsers.c
index 9e076328..5a5cf8e0 100644
--- a/src/util-prop-parsers.c
+++ b/src/util-prop-parsers.c
@@ -402,6 +402,63 @@ out:
return rc;
}
+/**
+ * Parses a string of the format "INPUT_PROP_BUTTONPAD;INPUT_PROP_POINTER;0x123;"
+ * where each element must be a named input prop OR a hexcode in the form
+ * 0x1234
+ *
+ * props must point to an existing array of size nprops.
+ * nprops specifies the size of the array in props and returns the number
+ * of elements, elements exceeding nprops are simply ignored, just make sure
+ * props is large enough for your use-case.
+ *
+ * On success, props contains nprops elements.
+ */
+bool
+parse_input_prop_property(const char *prop, unsigned int *props_out, size_t *nprops)
+{
+ char **strv = NULL;
+ bool rc = false;
+ size_t count = 0;
+ size_t idx;
+ unsigned int props[INPUT_PROP_CNT]; /* doubling up on quirks is a bug */
+
+ strv = strv_from_string(prop, ";");
+ if (!strv)
+ goto out;
+
+ for (idx = 0; strv[idx]; idx++)
+ count++;
+
+ if (count == 0 || count > ARRAY_LENGTH(props))
+ goto out;
+
+ count = min(*nprops, count);
+ for (idx = 0; strv[idx]; idx++) {
+ char *s = strv[idx];
+ unsigned int prop;
+
+ if (safe_atou_base(s, &prop, 16)) {
+ if (prop > INPUT_PROP_MAX)
+ goto out;
+ } else {
+ int val = libevdev_property_from_name(s);
+ if (val == -1)
+ goto out;
+ prop = (unsigned int)val;
+ }
+ props[idx] = prop;
+ }
+
+ memcpy(props_out, props, count * sizeof *props);
+ *nprops = count;
+ rc = true;
+
+out:
+ strv_free(strv);
+ return rc;
+}
+
/**
* Parse the property value for the EVDEV_ABS_00 properties. Spec is
* EVDEV_ABS_00=min:max:res:fuzz:flat
diff --git a/src/util-prop-parsers.h b/src/util-prop-parsers.h
index 7ed136a9..5f0d8673 100644
--- a/src/util-prop-parsers.h
+++ b/src/util-prop-parsers.h
@@ -38,6 +38,7 @@ bool parse_calibration_property(const char *prop, float calibration[6]);
bool parse_range_property(const char *prop, int *hi, int *lo);
#define EVENT_CODE_UNDEFINED 0xffff
bool parse_evcode_property(const char *prop, struct input_event *events, size_t *nevents);
+bool parse_input_prop_property(const char *prop, unsigned int *props_out, size_t *nprops);
enum tpkbcombo_layout {
TPKBCOMBO_LAYOUT_UNKNOWN,
diff --git a/test/litest-device-keyboard-quirked.c b/test/litest-device-keyboard-quirked.c
index 748794b2..53161fa4 100644
--- a/test/litest-device-keyboard-quirked.c
+++ b/test/litest-device-keyboard-quirked.c
@@ -191,6 +191,10 @@ static int events[] = {
EV_LED, LED_NUML,
EV_LED, LED_CAPSL,
EV_LED, LED_SCROLLL,
+
+ /* gets disabled */
+ INPUT_PROP_MAX, INPUT_PROP_POINTING_STICK,
+
-1, -1,
};
@@ -201,7 +205,18 @@ static const char quirk_file[] =
"\n"
"[litest Quirked keyboard disable F1-F3]\n"
"MatchName=litest Quirked Keyboard\n"
-"AttrEventCodeDisable=KEY_F1;EV_KEY:0x3c;KEY_F3\n";
+"AttrEventCodeDisable=KEY_F1;EV_KEY:0x3c;KEY_F3\n"
+#if HAVE_LIBEVDEV_DISABLE_PROPERTY
+"\n"
+"[litest Quirked keyboard enable buttonpad]\n"
+"MatchName=litest Quirked Keyboard\n"
+"AttrInputPropEnable=INPUT_PROP_BUTTONPAD\n"
+"\n"
+"[litest Quirked keyboard disable pointingstick]\n"
+"MatchName=litest Quirked Keyboard\n"
+"AttrInputPropDisable=INPUT_PROP_POINTING_STICK\n"
+#endif
+;
TEST_DEVICE("keyboard-quirked",
.type = LITEST_KEYBOARD_QUIRKED,
diff --git a/test/test-device.c b/test/test-device.c
index a50372d4..6c38ed44 100644
--- a/test/test-device.c
+++ b/test/test-device.c
@@ -1454,6 +1454,10 @@ START_TEST(device_quirks)
char **message;
bool disable_key_f1 = false,
enable_btn_left = false;
+#if HAVE_LIBEVDEV_DISABLE_PROPERTY
+ bool disable_pointingstick = false,
+ enable_buttonpad = false;
+#endif
li = litest_create_context();
libinput_log_set_priority(li, LIBINPUT_LOG_PRIORITY_DEBUG);
@@ -1480,12 +1484,22 @@ START_TEST(device_quirks)
disable_key_f1 = true;
if (strstr(*message, "enabling EV_KEY BTN_LEFT"))
enable_btn_left = true;
-
+#if HAVE_LIBEVDEV_DISABLE_PROPERTY
+ if (strstr(*message, "enabling INPUT_PROP_BUTTONPAD"))
+ enable_buttonpad = true;
+ if (strstr(*message, "disabling INPUT_PROP_POINTING_STICK"))
+ disable_pointingstick = true;
+#endif
+ free(*message);
message++;
}
ck_assert(disable_key_f1);
ck_assert(enable_btn_left);
+#if HAVE_LIBEVDEV_DISABLE_PROPERTY
+ ck_assert(enable_buttonpad);
+ ck_assert(disable_pointingstick);
+#endif
litest_disable_log_handler(li);
diff --git a/test/test-utils.c b/test/test-utils.c
index 5faec0e4..5955f56e 100644
--- a/test/test-utils.c
+++ b/test/test-utils.c
@@ -546,6 +546,52 @@ START_TEST(evcode_prop_parser)
}
END_TEST
+START_TEST(input_prop_parser)
+{
+ struct parser_test_val {
+ const char *prop;
+ bool success;
+ size_t nvals;
+ uint32_t values[20];
+ } tests[] = {
+ { "INPUT_PROP_BUTTONPAD", true, 1, {INPUT_PROP_BUTTONPAD}},
+ { "INPUT_PROP_BUTTONPAD;INPUT_PROP_POINTER", true, 2,
+ { INPUT_PROP_BUTTONPAD,
+ INPUT_PROP_POINTER }},
+ { "INPUT_PROP_BUTTONPAD;0x00;0x03", true, 3,
+ { INPUT_PROP_BUTTONPAD,
+ INPUT_PROP_POINTER,
+ INPUT_PROP_SEMI_MT }},
+ { .prop = "", .success = false },
+ { .prop = "0xff", .success = false },
+ { .prop = "INPUT_PROP", .success = false },
+ { .prop = "INPUT_PROP_FOO", .success = false },
+ { .prop = "INPUT_PROP_FOO;INPUT_PROP_FOO", .success = false },
+ { .prop = "INPUT_PROP_POINTER;INPUT_PROP_FOO", .success = false },
+ { .prop = "none", .success = false },
+ { .prop = NULL },
+ };
+ struct parser_test_val *t;
+
+ for (int i = 0; tests[i].prop; i++) {
+ bool success;
+ uint32_t props[32];
+ size_t nprops = ARRAY_LENGTH(props);
+
+ t = &tests[i];
+ success = parse_input_prop_property(t->prop, props, &nprops);
+ ck_assert(success == t->success);
+ if (!success)
+ continue;
+
+ ck_assert_int_eq(nprops, t->nvals);
+ for (size_t j = 0; j < t->nvals; j++) {
+ ck_assert_int_eq(t->values[j], props[j]);
+ }
+ }
+}
+END_TEST
+
START_TEST(evdev_abs_parser)
{
struct test {
@@ -1244,6 +1290,7 @@ litest_utils_suite(void)
tcase_add_test(tc, calibration_prop_parser);
tcase_add_test(tc, range_prop_parser);
tcase_add_test(tc, evcode_prop_parser);
+ tcase_add_test(tc, input_prop_parser);
tcase_add_test(tc, evdev_abs_parser);
tcase_add_test(tc, safe_atoi_test);
tcase_add_test(tc, safe_atoi_base_16_test);
--
2.31.1

View File

@ -0,0 +1,38 @@
From 74c88061868466c446a8de797ebe392eeabc7ccb Mon Sep 17 00:00:00 2001
From: Marge Yang <marge.yang@synaptics.corp-partner.google.com>
Date: Tue, 21 Jan 2025 07:26:41 +0000
Subject: [PATCH] quirks: add quirk for Dell Haptics Touchpad.
This Touchpad is a pressure pad and needs the pressure
handling disable.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1127>
(cherry picked from commit af0e9a23c32d086fece58a95cb720994ad02d0b4)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
quirks/50-system-dell.quirks | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/quirks/50-system-dell.quirks b/quirks/50-system-dell.quirks
index 0fb43aacd08b..141d279e3769 100644
--- a/quirks/50-system-dell.quirks
+++ b/quirks/50-system-dell.quirks
@@ -122,3 +122,15 @@ MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFA0
AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
+
+[Dell laptop 14 Synaptics touchpad]
+MatchBus=i2c
+MatchVendor=0x06CB
+MatchProduct=0xCFF8
+AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
+
+[Dell laptop 16 Synaptics touchpad]
+MatchBus=i2c
+MatchVendor=0x06CB
+MatchProduct=0xCFF9
+AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
--
2.48.1

View File

@ -0,0 +1,39 @@
From 8c48f459ba0922e5b550ca8933ee26ff17f9cdc7 Mon Sep 17 00:00:00 2001
From: wangyafei <wangyafei@goodix.com>
Date: Tue, 21 Jan 2025 17:17:05 +0800
Subject: [PATCH] quirks: add quirks for Dell laptop with Goodix Touchpad.
This touchpad is a pressure pad and needs the pressure
handling disable.
Signed-off-by: Charles Wang <charles.goodix@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1130>
(cherry picked from commit 3cf6c91fff5b84757792810c4016144443581da6)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
quirks/50-system-dell.quirks | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/quirks/50-system-dell.quirks b/quirks/50-system-dell.quirks
index 141d279e3769..df657eb61b97 100644
--- a/quirks/50-system-dell.quirks
+++ b/quirks/50-system-dell.quirks
@@ -134,3 +134,15 @@ MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCFF9
AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
+
+[Dell laptop 14 Goodix touchpad]
+MatchBus=i2c
+MatchVendor=0x27C6
+MatchProduct=0x0F61
+AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
+
+[Dell laptop 16 Goodix touchpad]
+MatchBus=i2c
+MatchVendor=0x27C6
+MatchProduct=0x0F62
+AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
--
2.48.1

View File

@ -1,85 +0,0 @@
From ab7b8fb32294d0923af4132e85c00d7b6c51e1d3 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 10 Nov 2020 13:32:26 +1000
Subject: [PATCH libinput 5/5] tools: print the AttrEventCodeEnable and
AttrInputPropEnable/Disable quirks
Introduced in e3c4ff3 and e882bd02
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 2c50ffab249f21f6dece2fdd0f45a6f2427f44bb)
---
tools/shared.c | 37 +++++++++++++++++++++++++++++++++----
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/tools/shared.c b/tools/shared.c
index af791274..55c48ea1 100644
--- a/tools/shared.c
+++ b/tools/shared.c
@@ -576,15 +576,15 @@ tools_exec_command(const char *prefix, int real_argc, char **real_argv)
}
static void
-sprintf_event_codes(char *buf, size_t sz, struct quirks *quirks)
+sprintf_event_codes(char *buf, size_t sz, struct quirks *quirks, enum quirk q)
{
const struct quirk_tuples *t;
size_t off = 0;
int printed;
const char *name;
- quirks_get_tuples(quirks, QUIRK_ATTR_EVENT_CODE_DISABLE, &t);
- name = quirk_get_name(QUIRK_ATTR_EVENT_CODE_DISABLE);
+ quirks_get_tuples(quirks, q, &t);
+ name = quirk_get_name(q);
printed = snprintf(buf, sz, "%s=", name);
assert(printed != -1);
off += printed;
@@ -600,6 +600,29 @@ sprintf_event_codes(char *buf, size_t sz, struct quirks *quirks)
}
}
+static void
+sprintf_input_props(char *buf, size_t sz, struct quirks *quirks, enum quirk q)
+{
+ const uint32_t *properties;
+ size_t nprops = 0;
+ size_t off = 0;
+ int printed;
+ const char *name;
+
+ quirks_get_uint32_array(quirks, q, &properties, &nprops);
+ name = quirk_get_name(q);
+ printed = snprintf(buf, sz, "%s=", name);
+ assert(printed != -1);
+ off += printed;
+
+ for (size_t i = 0; off < sz && i < nprops; i++) {
+ const char *name = libevdev_property_get_name(properties[i]);
+ printed = snprintf(buf + off, sz - off, "%s;", name);
+ assert(printed != -1);
+ off += printed;
+ }
+}
+
void
tools_list_device_quirks(struct quirks_context *ctx,
struct udev_device *device,
@@ -680,7 +703,13 @@ tools_list_device_quirks(struct quirks_context *ctx,
callback(userdata, buf);
break;
case QUIRK_ATTR_EVENT_CODE_DISABLE:
- sprintf_event_codes(buf, sizeof(buf), quirks);
+ case QUIRK_ATTR_EVENT_CODE_ENABLE:
+ sprintf_event_codes(buf, sizeof(buf), quirks, q);
+ callback(userdata, buf);
+ break;
+ case QUIRK_ATTR_INPUT_PROP_DISABLE:
+ case QUIRK_ATTR_INPUT_PROP_ENABLE:
+ sprintf_input_props(buf, sizeof(buf), quirks, q);
callback(userdata, buf);
break;
default:
--
2.31.1

View File

@ -0,0 +1,527 @@
From f746dfd4d8e2c6c2dca522ca1269451612d5cef8 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 22 Jul 2025 14:22:34 +1000
Subject: [PATCH] RHEL: map dials to rings on the Intuos Pro 3rd Gen devices
These devices have relative dials but our userspace stack
(mutter/gnome-shell and Wayland) do not have support for relative dials.
This means they can't be configured and any events cannot be
passed through to the client.
Work around this for this set of devices by mapping the relative dials
to a ring. This isn't a perfect emulation - the last value is simply
remembered but we only get so much data from a dial.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
meson.build | 1 +
quirks/30-vendor-wacom.quirks | 42 ++++++
src/evdev-tablet-pad.c | 140 ++++++++++++++++++
src/evdev-tablet-pad.h | 13 ++
src/quirks.c | 1 +
src/quirks.h | 1 +
test/litest-device-wacom-intuos-pro-3rd-pad.c | 87 +++++++++++
test/litest.h | 1 +
test/test-tablet.c | 58 ++++++++
9 files changed, 344 insertions(+)
create mode 100644 test/litest-device-wacom-intuos-pro-3rd-pad.c
diff --git a/meson.build b/meson.build
index a909ff1966a8..96bbb4dabb22 100644
--- a/meson.build
+++ b/meson.build
@@ -793,6 +793,7 @@ if get_option('tests')
'test/litest-device-wacom-cintiq-pro-16-pen.c',
'test/litest-device-wacom-ekr.c',
'test/litest-device-wacom-hid4800-pen.c',
+ 'test/litest-device-wacom-intuos-pro-3rd-pad.c',
'test/litest-device-wacom-intuos3-pad.c',
'test/litest-device-wacom-intuos5-finger.c',
'test/litest-device-wacom-intuos5-pad.c',
diff --git a/quirks/30-vendor-wacom.quirks b/quirks/30-vendor-wacom.quirks
index 42748116ba5c..646f052be137 100644
--- a/quirks/30-vendor-wacom.quirks
+++ b/quirks/30-vendor-wacom.quirks
@@ -19,3 +19,45 @@ MatchBus=usb
MatchVendor=0x56A
MatchProduct=0x4200
AttrEventCodeDisable=ABS_TILT_X;ABS_TILT_Y;
+
+[Wacom Intuos Pro 3rd L (0x03F9)]
+MatchUdevType=tablet
+MatchVendor=0x056A
+MatchProduct=0x03F9
+ModelWacomIntuosPro3rd=1
+
+[Wacom Intuos Pro 3rd L (0x03FA)]
+MatchUdevType=tablet
+MatchVendor=0x056A
+MatchProduct=0x03FA
+ModelWacomIntuosPro3rd=1
+
+[Wacom Intuos Pro 3rd L (0x0401)]
+MatchUdevType=tablet
+MatchVendor=0x056A
+MatchProduct=0x0401
+ModelWacomIntuosPro3rd=1
+
+[Wacom Intuos Pro 3rd M (0x03F7)]
+MatchUdevType=tablet
+MatchVendor=0x056A
+MatchProduct=0x03F7
+ModelWacomIntuosPro3rd=1
+
+[Wacom Intuos Pro 3rd M (0x03F9)]
+MatchUdevType=tablet
+MatchVendor=0x056A
+MatchProduct=0x03F9
+ModelWacomIntuosPro3rd=1
+
+[Wacom Intuos Pro 3rd S (0x03F6)]
+MatchUdevType=tablet
+MatchVendor=0x056A
+MatchProduct=0x03F6
+ModelWacomIntuosPro3rd=1
+
+[Wacom Intuos Pro 3rd S (0x03F5)]
+MatchUdevType=tablet
+MatchVendor=0x056A
+MatchProduct=0x03F5
+ModelWacomIntuosPro3rd=1
diff --git a/src/evdev-tablet-pad.c b/src/evdev-tablet-pad.c
index 4f4f7b57fc4b..4895e90ae188 100644
--- a/src/evdev-tablet-pad.c
+++ b/src/evdev-tablet-pad.c
@@ -96,6 +96,50 @@ pad_button_set_down(struct pad_dispatch *pad,
}
}
+static void
+pad_process_relative(struct pad_dispatch *pad,
+ struct evdev_device *device,
+ struct input_event *e,
+ uint64_t time)
+{
+ switch (e->code) {
+ case REL_DIAL:
+ pad->dials.dial1 = e->value * 120;
+ pad->changed_axes |= PAD_AXIS_DIAL1;
+ pad_set_status(pad, PAD_AXES_UPDATED);
+ break;
+ case REL_WHEEL:
+ if (!pad->dials.has_hires_dial) {
+ pad->dials.dial1 = -1 * e->value * 120;
+ pad->changed_axes |= PAD_AXIS_DIAL1;
+ pad_set_status(pad, PAD_AXES_UPDATED);
+ }
+ break;
+ case REL_HWHEEL:
+ if (!pad->dials.has_hires_dial) {
+ pad->dials.dial2 = e->value * 120;
+ pad->changed_axes |= PAD_AXIS_DIAL2;
+ pad_set_status(pad, PAD_AXES_UPDATED);
+ }
+ break;
+ case REL_WHEEL_HI_RES:
+ pad->dials.dial1 = -1 * e->value;
+ pad->changed_axes |= PAD_AXIS_DIAL1;
+ pad_set_status(pad, PAD_AXES_UPDATED);
+ break;
+ case REL_HWHEEL_HI_RES:
+ pad->dials.dial2 = e->value;
+ pad->changed_axes |= PAD_AXIS_DIAL2;
+ pad_set_status(pad, PAD_AXES_UPDATED);
+ break;
+ default:
+ evdev_log_info(device,
+ "Unhandled EV_REL event code %#x\n",
+ e->code);
+ break;
+ }
+}
+
static void
pad_process_absolute(struct pad_dispatch *pad,
struct evdev_device *device,
@@ -247,6 +291,30 @@ pad_strip_get_mode_group(struct pad_dispatch *pad,
return NULL;
}
+static double
+pad_ring_to_dial(double *current_value, double delta)
+{
+ /* The dial value is in v120 range but needs to be mapped to the 0..360
+ * degrees that the ring provides.
+ *
+ * Let's say one wheel detent (v120) is 15 degrees, this gives us 24
+ * lores wheel clicks to go the full 360 degrees circle.
+ * If we have 24 clicks per 360 that means our max value is 120 * 24
+ * after which we wrap around.
+ */
+ const int dial_degrees = 15;
+ const int detents_per_360 = 360 / dial_degrees;
+ const int wrap_threshold = 120 * detents_per_360;
+
+ double abs_value = *current_value + delta;
+ abs_value = fmod(abs_value + wrap_threshold, wrap_threshold);
+ *current_value = abs_value;
+
+ double degrees = abs_value * dial_degrees / 120;
+
+ return degrees;
+}
+
static void
pad_check_notify_axes(struct pad_dispatch *pad,
struct evdev_device *device,
@@ -263,6 +331,34 @@ pad_check_notify_axes(struct pad_dispatch *pad,
libevdev_get_event_value(device->evdev, EV_ABS, ABS_MISC) == 0)
send_finger_up = true;
+ if (pad->changed_axes & PAD_AXIS_DIAL1 && pad->dials.map_to_ring) {
+ double degrees = pad_ring_to_dial(&pad->dials.abs_dial1_value, pad->dials.dial1);
+ if (device->left_handed.enabled)
+ degrees = fmod(degrees + 180, 360);
+
+ group = pad_ring_get_mode_group(pad, 0);
+ tablet_pad_notify_ring(base,
+ time,
+ 0,
+ degrees,
+ LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN,
+ group);
+ }
+
+ if (pad->changed_axes & PAD_AXIS_DIAL2 && pad->dials.map_to_ring) {
+ double degrees = pad_ring_to_dial(&pad->dials.abs_dial2_value, pad->dials.dial2);
+ if (device->left_handed.enabled)
+ degrees = fmod(degrees + 180, 360);
+
+ group = pad_ring_get_mode_group(pad, 1);
+ tablet_pad_notify_ring(base,
+ time,
+ 1,
+ degrees,
+ LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN,
+ group);
+ }
+
if (pad->changed_axes & PAD_AXIS_RING1) {
value = pad_handle_ring(pad, device, ABS_WHEEL);
if (send_finger_up)
@@ -472,6 +568,8 @@ pad_flush(struct pad_dispatch *pad,
memcpy(&pad->prev_button_state,
&pad->button_state,
sizeof(pad->button_state));
+ pad->dials.dial1 = 0;
+ pad->dials.dial2 = 0;
}
static void
@@ -483,6 +581,9 @@ pad_process(struct evdev_dispatch *dispatch,
struct pad_dispatch *pad = pad_dispatch(dispatch);
switch (e->type) {
+ case EV_REL:
+ pad_process_relative(pad, device, e, time);
+ break;
case EV_ABS:
pad_process_absolute(pad, device, e, time);
break;
@@ -674,6 +775,19 @@ pad_init(struct pad_dispatch *pad, struct evdev_device *device)
pad->status = PAD_NONE;
pad->changed_axes = PAD_AXIS_NONE;
+ /* RHEL dial-to-ring special */
+ pad->dials.map_to_ring = evdev_device_has_model_quirk(device, QUIRK_MODEL_WACOM_INTUOS_PRO_3RD);
+
+ /* We expect the kernel to either give us both axes as hires or neither.
+ * Getting one is a kernel bug we don't need to care about */
+ pad->dials.has_hires_dial = libevdev_has_event_code(device->evdev, EV_REL, REL_WHEEL_HI_RES) ||
+ libevdev_has_event_code(device->evdev, EV_REL, REL_HWHEEL_HI_RES);
+
+ if (libevdev_has_event_code(device->evdev, EV_REL, REL_WHEEL) &&
+ libevdev_has_event_code(device->evdev, EV_REL, REL_DIAL)) {
+ log_bug_libinput(pad_libinput_context(pad), "Unsupported combination REL_DIAL and REL_WHEEL\n");
+ }
+
pad_init_buttons(pad, device);
pad_init_left_handed(device);
if (pad_init_leds(pad, device) != 0)
@@ -770,6 +884,23 @@ evdev_device_tablet_pad_get_num_buttons(struct evdev_device *device)
return pad->nbuttons;
}
+static int
+count_dials(struct libevdev *evdev)
+{
+ int ndials = 0;
+
+ if (libevdev_has_event_code(evdev, EV_REL, REL_WHEEL) ||
+ libevdev_has_event_code(evdev, EV_REL, REL_DIAL)) {
+ ndials++;
+ if (libevdev_has_event_code(evdev,
+ EV_REL,
+ REL_HWHEEL))
+ ndials++;
+ }
+
+ return ndials;
+}
+
int
evdev_device_tablet_pad_get_num_rings(struct evdev_device *device)
{
@@ -778,6 +909,15 @@ evdev_device_tablet_pad_get_num_rings(struct evdev_device *device)
if (!(device->seat_caps & EVDEV_DEVICE_TABLET_PAD))
return -1;
+ /* RHEL dial-to-ring special. Depending on the kernel the device may
+ * not have REL_WHEEL and is still on ABS_WHEEL etc. So we only
+ * count the dials if they're nonzero, otherwise fall back to ring */
+ if (evdev_device_has_model_quirk(device, QUIRK_MODEL_WACOM_INTUOS_PRO_3RD)) {
+ nrings = count_dials(device->evdev);
+ if (nrings)
+ return nrings;
+ }
+
if (libevdev_has_event_code(device->evdev, EV_ABS, ABS_WHEEL)) {
nrings++;
if (libevdev_has_event_code(device->evdev,
diff --git a/src/evdev-tablet-pad.h b/src/evdev-tablet-pad.h
index 3fc0f796a46a..c9c23583c714 100644
--- a/src/evdev-tablet-pad.h
+++ b/src/evdev-tablet-pad.h
@@ -41,6 +41,8 @@ enum pad_axes {
PAD_AXIS_RING2 = bit(1),
PAD_AXIS_STRIP1 = bit(2),
PAD_AXIS_STRIP2 = bit(3),
+ PAD_AXIS_DIAL1 = bit(4),
+ PAD_AXIS_DIAL2 = bit(5),
};
struct button_state {
@@ -73,6 +75,17 @@ struct pad_dispatch {
bool have_abs_misc_terminator;
+ struct {
+ bool has_hires_dial;
+ double dial1;
+ double dial2;
+
+ /* RHEL: map the dial to ring on selected devices */
+ bool map_to_ring;
+ double abs_dial1_value;
+ double abs_dial2_value;
+ } dials;
+
struct {
struct libinput_device_config_send_events config;
enum libinput_config_send_events_mode current_mode;
diff --git a/src/quirks.c b/src/quirks.c
index 795d29252ed2..55bee27a0d7f 100644
--- a/src/quirks.c
+++ b/src/quirks.c
@@ -267,6 +267,7 @@ quirk_get_name(enum quirk q)
case QUIRK_MODEL_TRACKBALL: return "ModelTrackball";
case QUIRK_MODEL_WACOM_TOUCHPAD: return "ModelWacomTouchpad";
case QUIRK_MODEL_DELL_CANVAS_TOTEM: return "ModelDellCanvasTotem";
+ case QUIRK_MODEL_WACOM_INTUOS_PRO_3RD: return "ModelWacomIntuosPro3rd";
case QUIRK_ATTR_SIZE_HINT: return "AttrSizeHint";
case QUIRK_ATTR_TOUCH_SIZE_RANGE: return "AttrTouchSizeRange";
diff --git a/src/quirks.h b/src/quirks.h
index 471311885382..692cdef7df07 100644
--- a/src/quirks.h
+++ b/src/quirks.h
@@ -87,6 +87,7 @@ enum quirk {
QUIRK_MODEL_TRACKBALL,
QUIRK_MODEL_WACOM_TOUCHPAD,
QUIRK_MODEL_DELL_CANVAS_TOTEM,
+ QUIRK_MODEL_WACOM_INTUOS_PRO_3RD,
_QUIRK_LAST_MODEL_QUIRK_, /* Guard: do not modify */
diff --git a/test/litest-device-wacom-intuos-pro-3rd-pad.c b/test/litest-device-wacom-intuos-pro-3rd-pad.c
new file mode 100644
index 000000000000..d5e54d46db6b
--- /dev/null
+++ b/test/litest-device-wacom-intuos-pro-3rd-pad.c
@@ -0,0 +1,87 @@
+/*
+ * Copyright © 2016 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "config.h"
+
+#include "litest.h"
+#include "litest-int.h"
+
+static struct input_event down[] = {
+ { .type = -1, .code = -1 },
+};
+
+static struct input_event move[] = {
+ { .type = -1, .code = -1 },
+};
+
+static struct litest_device_interface interface = {
+ .touch_down_events = down,
+ .touch_move_events = move,
+};
+
+static struct input_absinfo absinfo[] = {
+ { ABS_X, 0, 1, 0, 0, 0 },
+ { ABS_Y, 0, 1, 0, 0, 0 },
+ { ABS_MISC, 0, 0, 0, 0, 0 },
+ { .value = -1 },
+};
+
+static struct input_id input_id = {
+ .bustype = 0x3,
+ .vendor = 0x56a,
+ .product = 0x3f9,
+};
+
+static int events[] = {
+ EV_KEY, BTN_0,
+ EV_KEY, BTN_1,
+ EV_KEY, BTN_2,
+ EV_KEY, BTN_3,
+ EV_KEY, BTN_4,
+ EV_KEY, BTN_5,
+ EV_KEY, BTN_6,
+ EV_KEY, BTN_7,
+ EV_KEY, BTN_8,
+ EV_KEY, BTN_9,
+ EV_KEY, BTN_STYLUS,
+ EV_REL, REL_WHEEL,
+ EV_REL, REL_HWHEEL,
+ EV_REL, REL_WHEEL_HI_RES,
+ EV_REL, REL_HWHEEL_HI_RES,
+ -1, -1,
+};
+
+TEST_DEVICE("wacom-intuos3-pad",
+ .type = LITEST_WACOM_INTUOS_PRO_3RD_PAD,
+ .features = LITEST_TABLET_PAD, /* RHEL: not LITEST_DIAL because it's special */
+ .interface = &interface,
+
+ .name = "Wacom Intuos Pro L Pad",
+ .id = &input_id,
+ .events = events,
+ .absinfo = absinfo,
+ .udev_properties = {
+ { "ID_INPUT_TABLET_PAD", "1" },
+ { NULL },
+ },
+)
diff --git a/test/litest.h b/test/litest.h
index c16670e7386f..185b2e8aae85 100644
--- a/test/litest.h
+++ b/test/litest.h
@@ -271,6 +271,7 @@ enum litest_device_type {
LITEST_SYNAPTICS_I2C,
LITEST_WACOM_CINTIQ_24HD,
LITEST_MULTITOUCH_FUZZ_SCREEN,
+ LITEST_WACOM_INTUOS_PRO_3RD_PAD,
LITEST_WACOM_INTUOS3_PAD,
LITEST_WACOM_INTUOS5_PAD,
LITEST_KEYBOARD_ALL_CODES,
diff --git a/test/test-tablet.c b/test/test-tablet.c
index d2b461a373aa..91ffc071ac2f 100644
--- a/test/test-tablet.c
+++ b/test/test-tablet.c
@@ -6086,6 +6086,61 @@ START_TEST(tablet_smoothing)
}
END_TEST
+START_TEST(tablet_dial_to_ring)
+{
+ struct litest_device *dev = litest_current_device();
+ struct libinput *li = dev->libinput;
+ struct libinput_event *event;
+ struct libinput_event_tablet_pad *pev;
+
+ /* The range is a bitmask of ring, direction, left-handed */
+ int testcase = _i; /* ranged test */
+ unsigned int ring = testcase & 0x1;
+ int direction = testcase & 0x2 ? -1 : 1;
+ bool left_handed = !!(testcase & 0x4);
+
+ litest_assert_int_lt(testcase, 8);
+
+ const int degrees_per_detent = 15;
+
+ litest_assert_int_eq(libinput_device_tablet_pad_get_num_rings(dev->libinput_device), 2);
+
+ /* The dial-to-ring affected devices do not support left-handed so let's
+ * make sure setting left-handed a) doesn't work and b) the setting
+ * doesn't affect anything.
+ */
+ enum libinput_config_status rc = libinput_device_config_left_handed_set(dev->libinput_device, left_handed);
+ litest_assert_int_eq(rc, (unsigned)LIBINPUT_CONFIG_STATUS_UNSUPPORTED);
+
+ litest_drain_events(li);
+
+ double expected = 0.0;
+ for (size_t count = 0; count < 36; count++) { /* 24 per 360 so let's do 1.5 rotations */
+ if (ring == 0) {
+ /* REL_WHEEL is inverted to expectations */
+ litest_event(dev, EV_REL, REL_WHEEL, 1 * -direction);
+ litest_event(dev, EV_REL, REL_WHEEL_HI_RES, 120 * -direction);
+ litest_event(dev, EV_SYN, SYN_REPORT, 0);
+ } else {
+ litest_event(dev, EV_REL, REL_HWHEEL, 1 * direction);
+ litest_event(dev, EV_REL, REL_HWHEEL_HI_RES, 120 * direction);
+ litest_event(dev, EV_SYN, SYN_REPORT, 0);
+ }
+
+ libinput_dispatch(li);
+
+ expected += 360 + direction * degrees_per_detent;
+ expected = fmod(expected, 360);
+
+ event = libinput_get_event(li);
+ pev = litest_is_pad_ring_event(event, ring, LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN);
+ double value = libinput_event_tablet_pad_get_ring_position(pev);
+ litest_assert_double_eq(value, expected);
+ libinput_event_destroy(event);
+ }
+}
+END_TEST
+
TEST_COLLECTION(tablet)
{
struct range with_timeout = { 0, 2 };
@@ -6212,4 +6267,7 @@ TEST_COLLECTION(tablet)
litest_add_ranged_for_device(huion_static_btn_tool_pen_disable_quirk_on_prox_out, LITEST_HUION_TABLET, &with_timeout);
litest_add_for_device(tablet_smoothing, LITEST_WACOM_HID4800_PEN);
+
+ struct range dial_ring_cases = { 0, 8 };
+ litest_add_ranged_for_device(tablet_dial_to_ring, LITEST_WACOM_INTUOS_PRO_3RD_PAD, &dial_ring_cases);
}
--
2.50.1

View File

@ -1,32 +0,0 @@
From 89e2e00b307d7aea63b43ff83cbf520aee27fad5 Mon Sep 17 00:00:00 2001
From: Scott Jann <sjann@knight-rider.org>
Date: Mon, 3 Aug 2020 00:03:59 -0500
Subject: [PATCH libinput] quirks: add quirk for Dell Precision 7550/7750
touchpad
Signed-off-by: Scott Jann <sjann@knight-rider.org>
(cherry picked from commit 69959c8a3b0612fb2bea015713f630a896188529)
---
quirks/50-system-dell.quirks | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/quirks/50-system-dell.quirks b/quirks/50-system-dell.quirks
index 232c309a..aaddbffe 100644
--- a/quirks/50-system-dell.quirks
+++ b/quirks/50-system-dell.quirks
@@ -65,6 +65,12 @@ MatchName=*DualPoint Stick
MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE7470*
AttrTrackpointMultiplier=0.125
+[Precision 7x50 Touchpad]
+MatchBus=i2c
+MatchUdevType=touchpad
+MatchDMIModalias=dmi:*svnDellInc.:pnPrecision7?50*
+AttrInputPropDisable=INPUT_PROP_BUTTONPAD
+
# The touch device has the same vid/pid as the totem, the MatchName
# directive is required here
[Canvas Totem]
--
2.31.1

View File

@ -0,0 +1,134 @@
From 35c2d7ebba6862be0531a588143522ebcd6170eb Mon Sep 17 00:00:00 2001
From: whot <whot@localhost.localdomain>
Date: Mon, 4 Aug 2025 13:43:54 +1000
Subject: [PATCH] pad: don't assert when unable to find the mode group, just
discard
Instead of a hard assert if we fail to find the mode group for the given
ring/dial/strip let's just log an error and discard the event.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
src/evdev-tablet-pad.c | 58 +++++++++++++++++++++++-------------------
src/evdev-tablet-pad.h | 1 +
2 files changed, 33 insertions(+), 26 deletions(-)
diff --git a/src/evdev-tablet-pad.c b/src/evdev-tablet-pad.c
index 4895e90ae188..782b04be00cd 100644
--- a/src/evdev-tablet-pad.c
+++ b/src/evdev-tablet-pad.c
@@ -270,8 +270,9 @@ pad_ring_get_mode_group(struct pad_dispatch *pad,
return group;
}
- assert(!"Unable to find ring mode group");
-
+ evdev_log_bug_libinput_ratelimit(pad->device,
+ &pad->modes.group_not_found,
+ "Unable to find mode group for ring %d\n", ring);
return NULL;
}
@@ -337,12 +338,13 @@ pad_check_notify_axes(struct pad_dispatch *pad,
degrees = fmod(degrees + 180, 360);
group = pad_ring_get_mode_group(pad, 0);
- tablet_pad_notify_ring(base,
- time,
- 0,
- degrees,
- LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN,
- group);
+ if (group)
+ tablet_pad_notify_ring(base,
+ time,
+ 0,
+ degrees,
+ LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN,
+ group);
}
if (pad->changed_axes & PAD_AXIS_DIAL2 && pad->dials.map_to_ring) {
@@ -351,12 +353,13 @@ pad_check_notify_axes(struct pad_dispatch *pad,
degrees = fmod(degrees + 180, 360);
group = pad_ring_get_mode_group(pad, 1);
- tablet_pad_notify_ring(base,
- time,
- 1,
- degrees,
- LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN,
- group);
+ if (group)
+ tablet_pad_notify_ring(base,
+ time,
+ 1,
+ degrees,
+ LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN,
+ group);
}
if (pad->changed_axes & PAD_AXIS_RING1) {
@@ -365,12 +368,13 @@ pad_check_notify_axes(struct pad_dispatch *pad,
value = -1.0;
group = pad_ring_get_mode_group(pad, 0);
- tablet_pad_notify_ring(base,
- time,
- 0,
- value,
- LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER,
- group);
+ if (group)
+ tablet_pad_notify_ring(base,
+ time,
+ 0,
+ value,
+ LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER,
+ group);
}
if (pad->changed_axes & PAD_AXIS_RING2) {
@@ -379,12 +383,13 @@ pad_check_notify_axes(struct pad_dispatch *pad,
value = -1.0;
group = pad_ring_get_mode_group(pad, 1);
- tablet_pad_notify_ring(base,
- time,
- 1,
- value,
- LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER,
- group);
+ if (group)
+ tablet_pad_notify_ring(base,
+ time,
+ 1,
+ value,
+ LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER,
+ group);
}
if (pad->changed_axes & PAD_AXIS_STRIP1) {
@@ -774,6 +779,7 @@ pad_init(struct pad_dispatch *pad, struct evdev_device *device)
pad->device = device;
pad->status = PAD_NONE;
pad->changed_axes = PAD_AXIS_NONE;
+ ratelimit_init(&pad->modes.group_not_found, s2us(60 * 60), 2);
/* RHEL dial-to-ring special */
pad->dials.map_to_ring = evdev_device_has_model_quirk(device, QUIRK_MODEL_WACOM_INTUOS_PRO_3RD);
diff --git a/src/evdev-tablet-pad.h b/src/evdev-tablet-pad.h
index c9c23583c714..c5aab243aab8 100644
--- a/src/evdev-tablet-pad.h
+++ b/src/evdev-tablet-pad.h
@@ -93,6 +93,7 @@ struct pad_dispatch {
struct {
struct list mode_group_list;
+ struct ratelimit group_not_found;
} modes;
};
--
2.50.1

View File

@ -4,8 +4,8 @@
%global gitversion 58abea394
Name: libinput
Version: 1.16.3
Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
Version: 1.19.3
Release: 7%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
Summary: Input device library
License: MIT
@ -18,29 +18,20 @@ Source2: commitid
Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz
%endif
# Backout the python-evdev -> python-libevdev conversion
Patch001: 0001-Revert-tools-switch-measure-touchpad-tap-to-python-l.patch
Patch002: 0002-Revert-tools-switch-measure-touchpad-pressure-to-pyt.patch
Patch003: 0003-Revert-tools-switch-measure-touch-size-to-python-lib.patch
Patch004: 0004-Revert-tools-switch-measure-fuzz-to-use-python-libev.patch
# AttrInputPropDisable support (#1951885)
Patch005: 0001-evdev-quirks_get_tuples-can-deal-with-a-NULL-quirks.patch
Patch006: 0002-evdev-localize-two-variables-during-quirks-handling.patch
Patch007: 0003-quirks-add-AttrEventCodeEnable-as-counterpoint-to-th.patch
Patch008: 0004-quirks-add-AttrInputPropEnable-and-Disable.patch
Patch009: 0005-tools-print-the-AttrEventCodeEnable-and-AttrInputPro.patch
Patch010: 0006-quirks-add-quirk-for-Dell-Precision-7550-7750-touchp.patch
# CVE-2022-1215: format string vulnerability (#2076815)
Patch011: 0001-evdev-strip-the-device-name-of-format-directives.patch
Patch0001: 0001-evdev-strip-the-device-name-of-format-directives.patch
Patch0002: 0002-quirks-add-quirks-for-Dell-Precision5680-Touchpad.patch
Patch0003: 0003-quirks-Dell-Mayabay-Pressure-Pad.patch
Patch0004: 0004-quirks-add-quirk-for-Dell-Haptics-Touchpad.patch
Patch0005: 0005-quirks-add-quirks-for-Dell-laptop-with-Goodix-Touchp.patch
Patch0006: 0006-RHEL-map-dials-to-rings-on-the-Intuos-Pro-3rd-Gen-de.patch
Patch0007: 0007-pad-don-t-assert-when-unable-to-find-the-mode-group-.patch
BuildRequires: git-core
BuildRequires: gcc gcc-c++
BuildRequires: gcc
BuildRequires: meson
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(mtdev) >= 1.1.0
BuildRequires: pkgconfig(libevdev) >= 1.10
BuildRequires: pkgconfig(libevdev) >= 0.4
BuildRequires: pkgconfig(libwacom) >= 0.20
BuildRequires: python3-devel
BuildRequires: check-devel
@ -65,7 +56,7 @@ developing applications that use %{name}.
%package utils
Summary: Utilities and tools for debugging %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-evdev python3-pyudev
Requires: python3-pyudev python3-libevdev
%description utils
The %{name}-utils package contains tools to debug hardware and analyze
@ -95,21 +86,10 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3')
%install
%meson_install
# Remove tools requiring python-libevdev
rm $RPM_BUILD_ROOT/%{_libexecdir}/libinput/libinput-replay
rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-record.1*
rm $RPM_BUILD_ROOT/%{_libexecdir}/libinput/libinput-analyze
rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-analyze.1*
rm $RPM_BUILD_ROOT/%{_libexecdir}/libinput/libinput-analyze-per-slot-delta
rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-analyze-per-slot-delta.1*
rm $RPM_BUILD_ROOT/%{_libexecdir}/libinput/libinput-measure-touchpad-size
rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-measure-touchpad-size.1*
%post
/sbin/ldconfig
/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || :
%{?ldconfig}
%postun -p /sbin/ldconfig
%ldconfig_postun
%files
@ -138,23 +118,35 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-measure-touchpad-size.1*
%{_libdir}/pkgconfig/libinput.pc
%files utils
%{_libexecdir}/libinput/libinput-analyze
%{_libexecdir}/libinput/libinput-analyze-per-slot-delta
%{_libexecdir}/libinput/libinput-analyze-recording
%{_libexecdir}/libinput/libinput-analyze-touch-down-state
%{_libexecdir}/libinput/libinput-debug-tablet
%{_libexecdir}/libinput/libinput-measure
%{_libexecdir}/libinput/libinput-measure-fuzz
%{_libexecdir}/libinput/libinput-measure-touchpad-tap
%{_libexecdir}/libinput/libinput-measure-touchpad-pressure
%{_libexecdir}/libinput/libinput-measure-touchpad-size
%{_libexecdir}/libinput/libinput-measure-touch-size
%{_libexecdir}/libinput/libinput-quirks
%{_libexecdir}/libinput/libinput-record
%{_libexecdir}/libinput/libinput-replay
%{_mandir}/man1/libinput-analyze.1*
%{_mandir}/man1/libinput-analyze-per-slot-delta.1*
%{_mandir}/man1/libinput-analyze-recording.1*
%{_mandir}/man1/libinput-analyze-touch-down-state.1*
%{_mandir}/man1/libinput-debug-tablet.1*
%{_mandir}/man1/libinput-measure.1*
%{_mandir}/man1/libinput-measure-fuzz.1*
%{_mandir}/man1/libinput-measure-touchpad-tap.1*
%{_mandir}/man1/libinput-measure-touch-size.1*
%{_mandir}/man1/libinput-measure-touchpad-pressure.1*
%{_mandir}/man1/libinput-measure-touchpad-size.1*
%{_mandir}/man1/libinput-quirks.1*
%{_mandir}/man1/libinput-quirks-list.1*
%{_mandir}/man1/libinput-quirks-validate.1*
%{_mandir}/man1/libinput-record.1*
%{_mandir}/man1/libinput-replay.1*
%files test
@ -162,62 +154,199 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-measure-touchpad-size.1*
%{_mandir}/man1/libinput-test-suite.1*
%changelog
* Thu Apr 28 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.16.3-3
- Fix a format string vulnerability in the device name logging (#2076815)
CVE-2022-1215
* Mon Aug 04 2025 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.3-7
- Fix crash when the Wacom Intuos Pro 3rd gen sends absolute wheel events
* Tue May 25 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.16.3-2
- Add support for AddrInputPropDisable (#1951885)
* Fri Jul 25 2025 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.3-6
- Add support for the Wacom Intuos Pro (RHEL-105483)
- Rename existing patches for better order clarity
* Mon Feb 24 2025 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.3-5
- Add quirks for four more dell touchpads (RHEL-69798)
* Thu Jul 06 2023 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.3-4
- Add quirk for the Mayabay pressurepad (#2219245, #2219812)
* Thu Jan 19 2023 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.3-3
- Add a quirk for the Dell Precision 5680 pressurepad (#2158075)
* Wed May 04 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.3-2
- CVE-2022-1215: fix a format string vulnerability (#2076816)
* Thu Jan 27 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.3-1
- libinput 1.19.3 (#2044716)
* Thu Oct 21 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.19.2-1
- libinput 1.19.2 (#2004309)
* Mon Oct 18 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.19.1-1
- libinput 1.19.1 (#2004309)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.18.0-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jun 10 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.18.0-1
- libinput 1.18.0 (#1970188)
* Tue May 04 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.17.2-1
- libinput 1.17.2 (#1955413)
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.17.1-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Mar 24 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.17.1-1
- libinput 1.17.1
* Tue Feb 23 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.17.0-1
- libinput 1.17.0
* Tue Feb 16 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.16.902-1
- libinput 1.16.902
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Nov 27 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.16.4-1
- libinput 1.16.4
* Tue Nov 03 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.16.3-1
- libinput 1.16.3 (#1886648)
- libinput 1.16.3
* Tue Sep 22 2020 Peter Hutterer <peter.hutterer@redhat.com>
- Drop gcc-c++ from the BuildRequires, it's no longer needed
* Thu Aug 13 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.16.1-1
- libinput 1.16.1
* Mon Aug 03 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.16.0-1
- libinput 1.16.0
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.902-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.902-1
- libinput 1.16rc2
* Wed Jul 15 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.901-1
- libinput 1.16rc1
* Fri Jun 19 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.6-1
- libinput 1.15.6
* Sat Apr 11 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.5-1
- libinput 1.15.5
* Wed Mar 18 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.4-1
- libinput 1.15.4
* Mon Mar 09 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.3-2
- fix libinput record's dmi modalias recording
* Fri Mar 06 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.3-1
- libinput 1.15.3
* Thu Feb 20 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.2-1
- libinput 1.15.2
* Mon Feb 03 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.1-1
- libinput 1.15.1
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jan 03 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.15.0-1
- libinput 1.15
* Thu Dec 05 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.14.901-1
- libinput 1.15rc1
* Tue Nov 19 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.14.3-2
- Point users to the libinput-utils package for missing tools.
* Mon Oct 28 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.14.3-1
- libinput 1.14.3 (#1728821)
- libinput 1.14.3
* Thu Oct 17 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.14.2-1
- libinput 1.14.2
* Mon Aug 26 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.14.1-1
- libinput 1.14.1
* Tue Aug 20 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.14.0-2
- Fix click+drag on clickpads
* Thu Aug 08 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.14.0-1
- libinput 1.14
* Wed Jul 31 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.13.902-1
- libinput 1.14rc2
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Jun 28 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.13.4-1
- libinput 1.13.4
* Mon Jun 24 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.13.3-1
- libinput 1.13.3
* Thu May 09 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.13.2-1
- libinput 1.13.3 (#1690212)
- libinput 1.13.2
* Fri Jan 11 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.3-3
- Allow for the tablet mode quirk to apply to touchpads (#1664225)
- Add a quirk for the Asus VivoBook Flip to keep the
keyboard and touchpad working in tablet mode
* Tue Apr 16 2019 Adam Williamson <awilliam@redhat.com> - 1.13.1-2
- Rebuild with Meson fix for #1699099
* Fri Dec 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.3-2
- Add a quirk for the Lenovo T480s (#1658604)
- Add a quirk for the HP Spectre x360
* Tue Apr 09 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.13.1-1
- libinput 1.13.1
* Tue Nov 13 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.3-1
- libinput 1.12.3 (#1647294)
* Fri Mar 29 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.13.0-1
- libinput 1.13.0
* Fri Nov 02 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-6
- Backport event code disabling quirks (#1643815)
* Thu Mar 21 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.902-1
- libinput 1.12.902
* Mon Oct 15 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-5
- Handle a touch restarting in the same frame (#1639091)
* Thu Mar 21 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.901-3
- Package the tests suite as subpackage
* Wed Oct 10 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-4
- Fix Wacom PTH660 palm threshold (#1637788)
* Fri Mar 15 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.901-2
- Require python3-libevdev for the utils subpackage
* Mon Oct 08 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-3
- Fix sporadic crash on two-finger scrolling (#1636282)
- Fix one more device quirk
* Thu Mar 14 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.901-1
- libinput 1.12.901
* Wed Sep 19 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-2
- Fix some buggy device quirks (related #1614636)
* Thu Feb 14 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.6-3
- Don't update the hwdb on install, we don't have any hwdb files anymore
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 21 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.6-1
- libinput 1.12.6
* Mon Jan 07 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.5-1
- libinput 1.12.5
* Tue Dec 18 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.4-1
- libinput 1.12.4
* Wed Nov 07 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.3-1
- libinput 1.12.3
* Wed Oct 24 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.2-1
- libinput 1.12.2
* Wed Oct 03 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.1-1
- libinput 1.12.1
* Tue Sep 11 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-1
- libinput 1.12.0 (#1614636)
- libinput 1.12
* Mon Sep 10 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.903-2
- drop libinput replay, this tool requires libevdev-python which we don't
have in RHEL and it's a debugging-tool only.
* Wed Sep 05 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.903-1
- libinput 1.12rc3 (#1614636)
* Tue Sep 04 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.903-1
- libinput 1.12rc3
* Tue Aug 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.902-1
- libinput 1.12rc2 (#1614636)
- libinput 1.12rc2
* Tue Jul 31 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.901-1
- libinput 1.12rc1