Compare commits
No commits in common. "c10s" and "c8" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
/libinput-*.tar.bz2
|
SOURCES/libinput-1.16.3.tar.xz
|
||||||
|
1
.libinput.metadata
Normal file
1
.libinput.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
ee1e93ee647bdd4598a5910eb654592563657d66 SOURCES/libinput-1.16.3.tar.xz
|
@ -0,0 +1,100 @@
|
|||||||
|
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
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
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
|
||||||
|
|
@ -0,0 +1,358 @@
|
|||||||
|
From d16e13645c11a4acdd6ed5f0bcbd486fcc2324f5 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
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
This fixes a format string vulnerabilty.
|
||||||
|
|
||||||
|
evdev_log_message() composes a format string consisting of a fixed
|
||||||
|
prefix (including the rendered device name) and the passed-in format
|
||||||
|
buffer. This format string is then passed with the arguments to the
|
||||||
|
actual log handler, which usually and eventually ends up being printf.
|
||||||
|
|
||||||
|
If the device name contains a printf-style format directive, these ended
|
||||||
|
up in the format string and thus get interpreted correctly, e.g. for a
|
||||||
|
device "Foo%sBar" the log message vs printf invocation ends up being:
|
||||||
|
evdev_log_message(device, "some message %s", "some argument");
|
||||||
|
printf("event9 - Foo%sBar: some message %s", "some argument");
|
||||||
|
|
||||||
|
This can enable an attacker to execute malicious code with the
|
||||||
|
privileges of the process using libinput.
|
||||||
|
|
||||||
|
To exploit this, an attacker needs to be able to create a kernel device
|
||||||
|
with a malicious name, e.g. through /dev/uinput or a Bluetooth device.
|
||||||
|
|
||||||
|
To fix this, convert any potential format directives in the device name
|
||||||
|
by duplicating percentages.
|
||||||
|
|
||||||
|
Pre-rendering the device to avoid the issue altogether would be nicer
|
||||||
|
but the current log level hooks do not easily allow for this. The device
|
||||||
|
name is the only user-controlled part of the format string.
|
||||||
|
|
||||||
|
A second potential issue is the sysname of the device which is also
|
||||||
|
sanitized.
|
||||||
|
|
||||||
|
This issue was found by Albin Eldstål-Ahrens and Benjamin Svensson from
|
||||||
|
Assured AB, and independently by Lukas Lamster.
|
||||||
|
|
||||||
|
Fixes #752
|
||||||
|
|
||||||
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
|
(cherry picked from commit a423d7d3269dc32a87384f79e29bb5ac021c83d1)
|
||||||
|
---
|
||||||
|
meson.build | 1 +
|
||||||
|
src/evdev.c | 31 +++++++++++------
|
||||||
|
src/evdev.h | 6 ++--
|
||||||
|
src/util-strings.h | 30 ++++++++++++++++
|
||||||
|
test/litest-device-format-string.c | 56 ++++++++++++++++++++++++++++++
|
||||||
|
test/litest.h | 1 +
|
||||||
|
test/test-utils.c | 26 ++++++++++++++
|
||||||
|
7 files changed, 139 insertions(+), 12 deletions(-)
|
||||||
|
create mode 100644 test/litest-device-format-string.c
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 040e3f1f..05e405fe 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -776,6 +776,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-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
|
||||||
|
--- a/src/evdev.c
|
||||||
|
+++ b/src/evdev.c
|
||||||
|
@@ -2218,19 +2218,19 @@ evdev_device_create(struct libinput_seat *seat,
|
||||||
|
struct libinput *libinput = seat->libinput;
|
||||||
|
struct evdev_device *device = NULL;
|
||||||
|
int rc;
|
||||||
|
- int fd;
|
||||||
|
+ int fd = -1;
|
||||||
|
int unhandled_device = 0;
|
||||||
|
const char *devnode = udev_device_get_devnode(udev_device);
|
||||||
|
- const char *sysname = udev_device_get_sysname(udev_device);
|
||||||
|
+ char *sysname = str_sanitize(udev_device_get_sysname(udev_device));
|
||||||
|
|
||||||
|
if (!devnode) {
|
||||||
|
log_info(libinput, "%s: no device node associated\n", sysname);
|
||||||
|
- return NULL;
|
||||||
|
+ goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (udev_device_should_be_ignored(udev_device)) {
|
||||||
|
log_debug(libinput, "%s: device is ignored\n", sysname);
|
||||||
|
- return NULL;
|
||||||
|
+ goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Use non-blocking mode so that we can loop on read on
|
||||||
|
@@ -2244,13 +2244,15 @@ evdev_device_create(struct libinput_seat *seat,
|
||||||
|
sysname,
|
||||||
|
devnode,
|
||||||
|
strerror(-fd));
|
||||||
|
- return NULL;
|
||||||
|
+ goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!evdev_device_have_same_syspath(udev_device, fd))
|
||||||
|
goto err;
|
||||||
|
|
||||||
|
device = zalloc(sizeof *device);
|
||||||
|
+ device->sysname = sysname;
|
||||||
|
+ sysname = NULL;
|
||||||
|
|
||||||
|
libinput_device_init(&device->base, seat);
|
||||||
|
libinput_seat_ref(seat);
|
||||||
|
@@ -2273,6 +2275,9 @@ evdev_device_create(struct libinput_seat *seat,
|
||||||
|
device->dispatch = NULL;
|
||||||
|
device->fd = fd;
|
||||||
|
device->devname = libevdev_get_name(device->evdev);
|
||||||
|
+ /* the log_prefix_name is used as part of a printf format string and
|
||||||
|
+ * must not contain % directives, see evdev_log_msg */
|
||||||
|
+ device->log_prefix_name = str_sanitize(device->devname);
|
||||||
|
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,
|
||||||
|
return device;
|
||||||
|
|
||||||
|
err:
|
||||||
|
- close_restricted(libinput, fd);
|
||||||
|
- if (device) {
|
||||||
|
- unhandled_device = device->seat_caps == 0;
|
||||||
|
- evdev_device_destroy(device);
|
||||||
|
+ if (fd >= 0) {
|
||||||
|
+ close_restricted(libinput, fd);
|
||||||
|
+ if (device) {
|
||||||
|
+ unhandled_device = device->seat_caps == 0;
|
||||||
|
+ evdev_device_destroy(device);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
+ free(sysname);
|
||||||
|
+
|
||||||
|
return unhandled_device ? EVDEV_UNHANDLED_DEVICE : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2331,7 +2340,7 @@ evdev_device_get_output(struct evdev_device *device)
|
||||||
|
const char *
|
||||||
|
evdev_device_get_sysname(struct evdev_device *device)
|
||||||
|
{
|
||||||
|
- return udev_device_get_sysname(device->udev_device);
|
||||||
|
+ return device->sysname;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
@@ -2909,6 +2918,8 @@ evdev_device_destroy(struct evdev_device *device)
|
||||||
|
if (device->base.group)
|
||||||
|
libinput_device_group_unref(device->base.group);
|
||||||
|
|
||||||
|
+ free(device->log_prefix_name);
|
||||||
|
+ free(device->sysname);
|
||||||
|
free(device->output_name);
|
||||||
|
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
|
||||||
|
--- a/src/evdev.h
|
||||||
|
+++ b/src/evdev.h
|
||||||
|
@@ -169,6 +169,8 @@ struct evdev_device {
|
||||||
|
struct udev_device *udev_device;
|
||||||
|
char *output_name;
|
||||||
|
const char *devname;
|
||||||
|
+ char *log_prefix_name;
|
||||||
|
+ char *sysname;
|
||||||
|
bool was_removed;
|
||||||
|
int fd;
|
||||||
|
enum evdev_device_seat_capability seat_caps;
|
||||||
|
@@ -770,7 +772,7 @@ evdev_log_msg(struct evdev_device *device,
|
||||||
|
sizeof(buf),
|
||||||
|
"%-7s - %s%s%s",
|
||||||
|
evdev_device_get_sysname(device),
|
||||||
|
- (priority > LIBINPUT_LOG_PRIORITY_DEBUG) ? device->devname : "",
|
||||||
|
+ (priority > LIBINPUT_LOG_PRIORITY_DEBUG) ? device->log_prefix_name : "",
|
||||||
|
(priority > LIBINPUT_LOG_PRIORITY_DEBUG) ? ": " : "",
|
||||||
|
format);
|
||||||
|
|
||||||
|
@@ -805,7 +807,7 @@ evdev_log_msg_ratelimit(struct evdev_device *device,
|
||||||
|
sizeof(buf),
|
||||||
|
"%-7s - %s%s%s",
|
||||||
|
evdev_device_get_sysname(device),
|
||||||
|
- (priority > LIBINPUT_LOG_PRIORITY_DEBUG) ? device->devname : "",
|
||||||
|
+ (priority > LIBINPUT_LOG_PRIORITY_DEBUG) ? device->log_prefix_name : "",
|
||||||
|
(priority > LIBINPUT_LOG_PRIORITY_DEBUG) ? ": " : "",
|
||||||
|
format);
|
||||||
|
|
||||||
|
diff --git a/src/util-strings.h b/src/util-strings.h
|
||||||
|
index 80e88aeb..5a0711d0 100644
|
||||||
|
--- a/src/util-strings.h
|
||||||
|
+++ b/src/util-strings.h
|
||||||
|
@@ -43,6 +43,8 @@
|
||||||
|
#include <xlocale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include "util-macros.h"
|
||||||
|
+
|
||||||
|
#define streq(s1, s2) (strcmp((s1), (s2)) == 0)
|
||||||
|
#define strneq(s1, s2, n) (strncmp((s1), (s2), (n)) == 0)
|
||||||
|
|
||||||
|
@@ -376,3 +378,31 @@ strstartswith(const char *str, const char *prefix)
|
||||||
|
|
||||||
|
return prefixlen > 0 ? strneq(str, prefix, strlen(prefix)) : false;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Return a copy of str with all % converted to %% to make the string
|
||||||
|
+ * acceptable as printf format.
|
||||||
|
+ */
|
||||||
|
+static inline char *
|
||||||
|
+str_sanitize(const char *str)
|
||||||
|
+{
|
||||||
|
+ if (!str)
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
+ if (!strchr(str, '%'))
|
||||||
|
+ return strdup(str);
|
||||||
|
+
|
||||||
|
+ size_t slen = min(strlen(str), 512);
|
||||||
|
+ char *sanitized = zalloc(2 * slen + 1);
|
||||||
|
+ const char *src = str;
|
||||||
|
+ char *dst = sanitized;
|
||||||
|
+
|
||||||
|
+ for (size_t i = 0; i < slen; i++) {
|
||||||
|
+ if (*src == '%')
|
||||||
|
+ *dst++ = '%';
|
||||||
|
+ *dst++ = *src++;
|
||||||
|
+ }
|
||||||
|
+ *dst = '\0';
|
||||||
|
+
|
||||||
|
+ return sanitized;
|
||||||
|
+}
|
||||||
|
diff --git a/test/litest-device-format-string.c b/test/litest-device-format-string.c
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..aed15db4
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/test/litest-device-format-string.c
|
||||||
|
@@ -0,0 +1,56 @@
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * 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 = 0x3,
|
||||||
|
+ .vendor = 0x0123,
|
||||||
|
+ .product = 0x0456,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static int events[] = {
|
||||||
|
+ EV_KEY, BTN_LEFT,
|
||||||
|
+ EV_KEY, BTN_RIGHT,
|
||||||
|
+ EV_KEY, BTN_MIDDLE,
|
||||||
|
+ EV_REL, REL_X,
|
||||||
|
+ EV_REL, REL_Y,
|
||||||
|
+ EV_REL, REL_WHEEL,
|
||||||
|
+ EV_REL, REL_WHEEL_HI_RES,
|
||||||
|
+ -1 , -1,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+TEST_DEVICE("mouse-format-string",
|
||||||
|
+ .type = LITEST_MOUSE_FORMAT_STRING,
|
||||||
|
+ .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL,
|
||||||
|
+ .interface = NULL,
|
||||||
|
+
|
||||||
|
+ .name = "Evil %s %d %x Mouse %p %",
|
||||||
|
+ .id = &input_id,
|
||||||
|
+ .absinfo = NULL,
|
||||||
|
+ .events = events,
|
||||||
|
+)
|
||||||
|
diff --git a/test/litest.h b/test/litest.h
|
||||||
|
index 25dc9eed..8b6d1ea3 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,
|
||||||
|
LITEST_KEYBOARD_QUIRKED,
|
||||||
|
+ LITEST_MOUSE_FORMAT_STRING,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LITEST_DEVICELESS -2
|
||||||
|
diff --git a/test/test-utils.c b/test/test-utils.c
|
||||||
|
index 5955f56e..aa239092 100644
|
||||||
|
--- a/test/test-utils.c
|
||||||
|
+++ b/test/test-utils.c
|
||||||
|
@@ -1196,6 +1196,31 @@ START_TEST(strstartswith_test)
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
|
+START_TEST(strsanitize_test)
|
||||||
|
+{
|
||||||
|
+ struct strsanitize_test {
|
||||||
|
+ const char *string;
|
||||||
|
+ const char *expected;
|
||||||
|
+ } tests[] = {
|
||||||
|
+ { "foobar", "foobar" },
|
||||||
|
+ { "", "" },
|
||||||
|
+ { "%", "%%" },
|
||||||
|
+ { "%%%%", "%%%%%%%%" },
|
||||||
|
+ { "x %s", "x %%s" },
|
||||||
|
+ { "x %", "x %%" },
|
||||||
|
+ { "%sx", "%%sx" },
|
||||||
|
+ { "%s%s", "%%s%%s" },
|
||||||
|
+ { NULL, NULL },
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ for (struct strsanitize_test *t = tests; t->string; t++) {
|
||||||
|
+ char *sanitized = str_sanitize(t->string);
|
||||||
|
+ ck_assert_str_eq(sanitized, t->expected);
|
||||||
|
+ free(sanitized);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+END_TEST
|
||||||
|
+
|
||||||
|
START_TEST(list_test_insert)
|
||||||
|
{
|
||||||
|
struct list_test {
|
||||||
|
@@ -1305,6 +1330,7 @@ litest_utils_suite(void)
|
||||||
|
tcase_add_test(tc, strstrip_test);
|
||||||
|
tcase_add_test(tc, strendswith_test);
|
||||||
|
tcase_add_test(tc, strstartswith_test);
|
||||||
|
+ tcase_add_test(tc, strsanitize_test);
|
||||||
|
tcase_add_test(tc, time_conversion);
|
||||||
|
tcase_add_test(tc, human_time);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.36.0
|
||||||
|
|
@ -0,0 +1,145 @@
|
|||||||
|
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
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
|
|
@ -0,0 +1,149 @@
|
|||||||
|
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
|
||||||
|
|
@ -0,0 +1,488 @@
|
|||||||
|
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
|
||||||
|
|
@ -0,0 +1,90 @@
|
|||||||
|
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
|
||||||
|
|
447
SOURCES/0004-quirks-add-AttrInputPropEnable-and-Disable.patch
Normal file
447
SOURCES/0004-quirks-add-AttrInputPropEnable-and-Disable.patch
Normal file
@ -0,0 +1,447 @@
|
|||||||
|
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
|
||||||
|
|
@ -0,0 +1,85 @@
|
|||||||
|
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
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
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
|
||||||
|
|
@ -4,11 +4,10 @@
|
|||||||
%global gitversion 58abea394
|
%global gitversion 58abea394
|
||||||
|
|
||||||
Name: libinput
|
Name: libinput
|
||||||
Version: 1.26.1
|
Version: 1.16.3
|
||||||
Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
|
Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
|
||||||
Summary: Input device library
|
Summary: Input device library
|
||||||
|
|
||||||
# SPDX
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.freedesktop.org/wiki/Software/libinput/
|
URL: http://www.freedesktop.org/wiki/Software/libinput/
|
||||||
%if 0%{?gitdate}
|
%if 0%{?gitdate}
|
||||||
@ -16,18 +15,34 @@ Source0: %{name}-%{gitdate}.tar.xz
|
|||||||
Source1: make-git-snapshot.sh
|
Source1: make-git-snapshot.sh
|
||||||
Source2: commitid
|
Source2: commitid
|
||||||
%else
|
%else
|
||||||
Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/libinput-%{version}.tar.bz2
|
Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz
|
||||||
%endif
|
%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
|
||||||
|
|
||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc gcc-c++
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: pkgconfig(libudev)
|
BuildRequires: pkgconfig(libudev)
|
||||||
BuildRequires: pkgconfig(mtdev) >= 1.1.0
|
BuildRequires: pkgconfig(mtdev) >= 1.1.0
|
||||||
BuildRequires: pkgconfig(libevdev) >= 0.4
|
BuildRequires: pkgconfig(libevdev) >= 1.10
|
||||||
BuildRequires: pkgconfig(libwacom) >= 0.20
|
BuildRequires: pkgconfig(libwacom) >= 0.20
|
||||||
BuildRequires: pkgconfig(udev)
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-rpm-macros
|
|
||||||
BuildRequires: check-devel
|
BuildRequires: check-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -50,7 +65,7 @@ developing applications that use %{name}.
|
|||||||
%package utils
|
%package utils
|
||||||
Summary: Utilities and tools for debugging %{name}
|
Summary: Utilities and tools for debugging %{name}
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-pyudev python3-libevdev
|
Requires: python3-evdev python3-pyudev
|
||||||
|
|
||||||
%description utils
|
%description utils
|
||||||
The %{name}-utils package contains tools to debug hardware and analyze
|
The %{name}-utils package contains tools to debug hardware and analyze
|
||||||
@ -65,9 +80,9 @@ The %{name}-test package contains the libinput test suite. It is not
|
|||||||
intended to be run by users.
|
intended to be run by users.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -S git -p1
|
%autosetup -S git
|
||||||
# Replace whatever the source uses with the approved call
|
# Replace whatever the source uses with the approved call
|
||||||
%py3_shebang_fix $(git grep -l '#!/usr/bin/.*python3')
|
pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3')
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%meson -Ddebug-gui=false \
|
%meson -Ddebug-gui=false \
|
||||||
@ -80,10 +95,21 @@ intended to be run by users.
|
|||||||
%install
|
%install
|
||||||
%meson_install
|
%meson_install
|
||||||
|
|
||||||
%post
|
# Remove tools requiring python-libevdev
|
||||||
%{?ldconfig}
|
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*
|
||||||
|
|
||||||
%ldconfig_postun
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || :
|
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -99,7 +125,6 @@ intended to be run by users.
|
|||||||
%{_libexecdir}/libinput/libinput-debug-events
|
%{_libexecdir}/libinput/libinput-debug-events
|
||||||
%{_libexecdir}/libinput/libinput-list-devices
|
%{_libexecdir}/libinput/libinput-list-devices
|
||||||
%{_mandir}/man1/libinput.1*
|
%{_mandir}/man1/libinput.1*
|
||||||
%dir %{_datadir}/libinput
|
|
||||||
%{_datadir}/libinput/*.quirks
|
%{_datadir}/libinput/*.quirks
|
||||||
%dir %{_datadir}/zsh
|
%dir %{_datadir}/zsh
|
||||||
%dir %{_datadir}/zsh/site-functions
|
%dir %{_datadir}/zsh/site-functions
|
||||||
@ -113,318 +138,86 @@ intended to be run by users.
|
|||||||
%{_libdir}/pkgconfig/libinput.pc
|
%{_libdir}/pkgconfig/libinput.pc
|
||||||
|
|
||||||
%files utils
|
%files utils
|
||||||
%{_libexecdir}/libinput/libinput-analyze
|
|
||||||
%{_libexecdir}/libinput/libinput-analyze-buttons
|
|
||||||
%{_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-debug-tablet
|
||||||
%{_libexecdir}/libinput/libinput-list-kernel-devices
|
|
||||||
%{_libexecdir}/libinput/libinput-measure
|
%{_libexecdir}/libinput/libinput-measure
|
||||||
%{_libexecdir}/libinput/libinput-measure-fuzz
|
%{_libexecdir}/libinput/libinput-measure-fuzz
|
||||||
%{_libexecdir}/libinput/libinput-measure-touchpad-tap
|
%{_libexecdir}/libinput/libinput-measure-touchpad-tap
|
||||||
%{_libexecdir}/libinput/libinput-measure-touchpad-pressure
|
%{_libexecdir}/libinput/libinput-measure-touchpad-pressure
|
||||||
%{_libexecdir}/libinput/libinput-measure-touchpad-size
|
|
||||||
%{_libexecdir}/libinput/libinput-measure-touch-size
|
%{_libexecdir}/libinput/libinput-measure-touch-size
|
||||||
%{_libexecdir}/libinput/libinput-quirks
|
%{_libexecdir}/libinput/libinput-quirks
|
||||||
%{_libexecdir}/libinput/libinput-record
|
%{_libexecdir}/libinput/libinput-record
|
||||||
%{_libexecdir}/libinput/libinput-replay
|
|
||||||
%{_mandir}/man1/libinput-analyze.1*
|
|
||||||
%{_mandir}/man1/libinput-analyze-buttons.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-debug-tablet.1*
|
||||||
%{_mandir}/man1/libinput-list-kernel-devices.1*
|
|
||||||
%{_mandir}/man1/libinput-measure.1*
|
%{_mandir}/man1/libinput-measure.1*
|
||||||
%{_mandir}/man1/libinput-measure-fuzz.1*
|
%{_mandir}/man1/libinput-measure-fuzz.1*
|
||||||
%{_mandir}/man1/libinput-measure-touchpad-tap.1*
|
%{_mandir}/man1/libinput-measure-touchpad-tap.1*
|
||||||
%{_mandir}/man1/libinput-measure-touch-size.1*
|
%{_mandir}/man1/libinput-measure-touch-size.1*
|
||||||
%{_mandir}/man1/libinput-measure-touchpad-pressure.1*
|
%{_mandir}/man1/libinput-measure-touchpad-pressure.1*
|
||||||
%{_mandir}/man1/libinput-measure-touchpad-size.1*
|
|
||||||
%{_mandir}/man1/libinput-quirks.1*
|
%{_mandir}/man1/libinput-quirks.1*
|
||||||
%{_mandir}/man1/libinput-quirks-list.1*
|
%{_mandir}/man1/libinput-quirks-list.1*
|
||||||
%{_mandir}/man1/libinput-quirks-validate.1*
|
%{_mandir}/man1/libinput-quirks-validate.1*
|
||||||
%{_mandir}/man1/libinput-record.1*
|
|
||||||
%{_mandir}/man1/libinput-replay.1*
|
%{_mandir}/man1/libinput-replay.1*
|
||||||
|
|
||||||
%files test
|
%files test
|
||||||
%{_libexecdir}/libinput/libinput-test
|
|
||||||
%{_libexecdir}/libinput/libinput-test-suite
|
%{_libexecdir}/libinput/libinput-test-suite
|
||||||
%{_libexecdir}/libinput/libinput-test-utils
|
|
||||||
%{_mandir}/man1/libinput-test.1*
|
|
||||||
%{_mandir}/man1/libinput-test-suite.1*
|
%{_mandir}/man1/libinput-test-suite.1*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.26.1-2
|
* Thu Apr 28 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.16.3-3
|
||||||
- Bump release for October 2024 mass rebuild:
|
- Fix a format string vulnerability in the device name logging (#2076815)
|
||||||
Resolves: RHEL-64018
|
CVE-2022-1215
|
||||||
|
|
||||||
* Thu Jun 27 2024 Peter Hutterer <peter.hutterer@redhat.com> - 1.26.1-1
|
* Tue May 25 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.16.3-2
|
||||||
- libinput 1.26.1
|
- Add support for AddrInputPropDisable (#1951885)
|
||||||
|
|
||||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.26.0-2
|
|
||||||
- Bump release for June 2024 mass rebuild
|
|
||||||
|
|
||||||
* Thu Jun 06 2024 Peter Hutterer <peter.hutterer@redhat.com> 1.26.0-1
|
|
||||||
- libinput 1.26.0
|
|
||||||
|
|
||||||
* Fri May 31 2024 Peter Hutterer <peter.hutterer@redhat.com> - 1.25.0-5
|
|
||||||
- Mark datadir/libinput as owned by us (#2283754)
|
|
||||||
|
|
||||||
* Wed Mar 27 2024 Arthur Bols <arthur@bols.dev> - 1.25.0-4
|
|
||||||
- Add quirk for Framework 16 to recognize keyboard as internal
|
|
||||||
|
|
||||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jan 15 2024 Peter Hutterer <peter.hutterer@redhat.com> - 1.25.0-1
|
|
||||||
- libinput 1.25
|
|
||||||
|
|
||||||
* Tue Sep 05 2023 Peter Hutterer <peter.hutterer@redhat.com>
|
|
||||||
- SPDX migration: license is already SPDX compatible
|
|
||||||
|
|
||||||
* Fri Aug 25 2023 Peter Hutterer <peter.hutterer@redhat.com> - 1.24.0-1
|
|
||||||
- libinput 1.24.0
|
|
||||||
|
|
||||||
* Thu Jul 20 2023 Peter Hutterer <peter.hutterer@redhat.com> - 1.23.0-3
|
|
||||||
- BuildRequires python3-rpm-macros for pathfix.py
|
|
||||||
|
|
||||||
* Tue Apr 11 2023 Peter Hutterer <peter.hutterer@redhat.com> - 1.23.0-2
|
|
||||||
- Add two patches for better Apple touchpad behavior (see libinput MR
|
|
||||||
834 and 897)
|
|
||||||
|
|
||||||
* Mon Mar 27 2023 Peter Hutterer <peter.hutterer@redhat.com> - 1.23.0-1
|
|
||||||
- libinput 1.23.0
|
|
||||||
|
|
||||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.22.1-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jan 16 2023 Peter Hutterer <peter.hutterer@redhat.com> - 1.22.1-1
|
|
||||||
- libinput 1.22.1
|
|
||||||
|
|
||||||
* Sat Nov 26 2022 Davide Cavalca <dcavalca@fedoraproject.org> 1.22.0-2
|
|
||||||
- Backport upstream patch to add Apple MTP touchpad quirk for Apple M2 laptops
|
|
||||||
|
|
||||||
* Mon Nov 21 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.22.0-1git58abea394}
|
|
||||||
- libinput 1.22.0
|
|
||||||
|
|
||||||
* Wed Aug 31 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.21.0-3
|
|
||||||
- Add udev to BuildRequires for udevdir to resolve againt
|
|
||||||
|
|
||||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.21.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jun 13 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.21.0-1
|
|
||||||
- libinput 1.21.0
|
|
||||||
|
|
||||||
* Wed Apr 20 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.20.1-1
|
|
||||||
- libinput 1.20.1
|
|
||||||
|
|
||||||
* Mon Feb 21 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.20.0-1
|
|
||||||
- libinput 1.20
|
|
||||||
|
|
||||||
* Mon Feb 07 2022 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.901-1
|
|
||||||
- libinput 1.20rc1
|
|
||||||
|
|
||||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.3-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Dec 13 2021 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.3-2
|
|
||||||
- Rebuild for libwacom soname bump
|
|
||||||
|
|
||||||
* Mon Dec 13 2021 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.3-1
|
|
||||||
- libinput 1.19.3
|
|
||||||
|
|
||||||
* Thu Oct 21 2021 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.2-1
|
|
||||||
- libinput 1.19.2
|
|
||||||
|
|
||||||
* Wed Sep 29 2021 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.1-1
|
|
||||||
- libinput 1.19.1
|
|
||||||
|
|
||||||
* Wed Sep 15 2021 Peter Hutterer <peter.hutterer@redhat.com> - 1.19.0-1
|
|
||||||
- libinput 1.19.0
|
|
||||||
|
|
||||||
* Wed Sep 01 2021 Peter Hutterer <peter.hutterer@redhat.com> - 1.18.901-1
|
|
||||||
- libinput 1.18.901
|
|
||||||
|
|
||||||
* Tue Aug 03 2021 Peter Hutterer <peter.hutterer@redhat.com> - 1.18.1-1
|
|
||||||
- libinput 1.18.1
|
|
||||||
|
|
||||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jun 21 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.18.0-2
|
|
||||||
- Add quirk for the Huawai Matebook 2020 (#1972370)
|
|
||||||
|
|
||||||
* Wed Jun 02 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.18.0-1
|
|
||||||
- libinput 1.18.0
|
|
||||||
|
|
||||||
* Wed May 26 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.17.901-1
|
|
||||||
- libinput 1.17.901
|
|
||||||
|
|
||||||
* Wed May 26 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.17.3-1
|
|
||||||
- libinput 1.17.3
|
|
||||||
|
|
||||||
* Fri Apr 30 2021 Peter Hutterer <peter.hutterer@redhat.com> 1.17.2-1
|
|
||||||
- libinput 1.17.2
|
|
||||||
|
|
||||||
* 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
|
* Tue Nov 03 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.16.3-1
|
||||||
- libinput 1.16.3
|
- libinput 1.16.3 (#1886648)
|
||||||
|
|
||||||
* 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
|
* Mon Oct 28 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.14.3-1
|
||||||
- libinput 1.14.3
|
- libinput 1.14.3 (#1728821)
|
||||||
|
|
||||||
* 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
|
* Thu May 09 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.13.2-1
|
||||||
- libinput 1.13.2
|
- libinput 1.13.3 (#1690212)
|
||||||
|
|
||||||
* Tue Apr 16 2019 Adam Williamson <awilliam@redhat.com> - 1.13.1-2
|
* Fri Jan 11 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.3-3
|
||||||
- Rebuild with Meson fix for #1699099
|
- 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 09 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.13.1-1
|
* Fri Dec 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.3-2
|
||||||
- libinput 1.13.1
|
- Add a quirk for the Lenovo T480s (#1658604)
|
||||||
|
- Add a quirk for the HP Spectre x360
|
||||||
|
|
||||||
* Fri Mar 29 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.13.0-1
|
* Tue Nov 13 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.3-1
|
||||||
- libinput 1.13.0
|
- libinput 1.12.3 (#1647294)
|
||||||
|
|
||||||
* Thu Mar 21 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.902-1
|
* Fri Nov 02 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-6
|
||||||
- libinput 1.12.902
|
- Backport event code disabling quirks (#1643815)
|
||||||
|
|
||||||
* Thu Mar 21 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.901-3
|
* Mon Oct 15 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-5
|
||||||
- Package the tests suite as subpackage
|
- Handle a touch restarting in the same frame (#1639091)
|
||||||
|
|
||||||
* Fri Mar 15 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.901-2
|
* Wed Oct 10 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-4
|
||||||
- Require python3-libevdev for the utils subpackage
|
- Fix Wacom PTH660 palm threshold (#1637788)
|
||||||
|
|
||||||
* Thu Mar 14 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.901-1
|
* Mon Oct 08 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-3
|
||||||
- libinput 1.12.901
|
- Fix sporadic crash on two-finger scrolling (#1636282)
|
||||||
|
- Fix one more device quirk
|
||||||
|
|
||||||
* Thu Feb 14 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.12.6-3
|
* Wed Sep 19 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-2
|
||||||
- Don't update the hwdb on install, we don't have any hwdb files anymore
|
- Fix some buggy device quirks (related #1614636)
|
||||||
|
|
||||||
* 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
|
* Tue Sep 11 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-1
|
||||||
- libinput 1.12
|
- libinput 1.12.0 (#1614636)
|
||||||
|
|
||||||
* Tue Sep 04 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.903-1
|
* Mon Sep 10 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.903-2
|
||||||
- libinput 1.12rc3
|
- 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 Aug 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.902-1
|
* Tue Aug 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.902-1
|
||||||
- libinput 1.12rc2
|
- libinput 1.12rc2 (#1614636)
|
||||||
|
|
||||||
* Tue Jul 31 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.901-1
|
* Tue Jul 31 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.11.901-1
|
||||||
- libinput 1.12rc1
|
- libinput 1.12rc1
|
@ -1,6 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-10
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}
|
|
@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
DIRNAME=libinput-$( date +%Y%m%d )
|
|
||||||
|
|
||||||
rm -rf $DIRNAME
|
|
||||||
git clone git://git.freedesktop.org/git/wayland/libinput $DIRNAME
|
|
||||||
cd $DIRNAME
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
git log | head -1
|
|
||||||
else
|
|
||||||
git checkout $1
|
|
||||||
fi
|
|
||||||
git log | head -1 | awk '{ print $2 }' > ../commitid
|
|
||||||
git repack -a -d
|
|
||||||
cd ..
|
|
||||||
tar jcf $DIRNAME.tar.xz $DIRNAME
|
|
||||||
rm -rf $DIRNAME
|
|
Loading…
Reference in New Issue
Block a user