From acba013430cd25bccdc7f902d564783d4acc004d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 17 Dec 2025 14:17:29 +1000 Subject: [PATCH] libinput 1.30.1 Resolves: RHEL-136390 --- ...o-rings-on-the-Intuos-Pro-3rd-Gen-de.patch | 188 ++++++++++-------- libinput.spec | 9 +- sources | 2 +- 3 files changed, 109 insertions(+), 90 deletions(-) diff --git a/0001-RHEL-map-dials-to-rings-on-the-Intuos-Pro-3rd-Gen-de.patch b/0001-RHEL-map-dials-to-rings-on-the-Intuos-Pro-3rd-Gen-de.patch index 7234b62..d7c0c4d 100644 --- a/0001-RHEL-map-dials-to-rings-on-the-Intuos-Pro-3rd-Gen-de.patch +++ b/0001-RHEL-map-dials-to-rings-on-the-Intuos-Pro-3rd-Gen-de.patch @@ -1,6 +1,6 @@ -From fd4da316fb4e0a7ec077eef795746744f9168b6d Mon Sep 17 00:00:00 2001 +From b4b2918b2ac67ba6553d79dbf1366cfc9b669080 Mon Sep 17 00:00:00 2001 From: Peter Hutterer -Date: Tue, 22 Jul 2025 14:22:34 +1000 +Date: Wed, 17 Dec 2025 14:35:37 +1000 Subject: [PATCH] RHEL: map dials to rings on the Intuos Pro 3rd Gen devices These devices have relative dials but our userspace stack @@ -16,21 +16,21 @@ Signed-off-by: Peter Hutterer --- meson.build | 1 + quirks/30-vendor-wacom.quirks | 42 +++++++++ - src/evdev-tablet-pad.c | 89 ++++++++++++++++--- - src/evdev-tablet-pad.h | 5 ++ - src/quirks.c | 1 + + src/evdev-tablet-pad.c | 92 +++++++++++++++++-- + src/evdev-tablet-pad.h | 5 + + src/quirks.c | 3 +- src/quirks.h | 1 + - test/litest-device-wacom-intuos-pro-3rd-pad.c | 86 ++++++++++++++++++ + test/litest-device-wacom-intuos-pro-3rd-pad.c | 86 +++++++++++++++++ test/litest.h | 1 + - test/test-tablet.c | 59 ++++++++++++ - 9 files changed, 275 insertions(+), 10 deletions(-) + test/test-pad.c | 72 +++++++++++++++ + 9 files changed, 292 insertions(+), 11 deletions(-) create mode 100644 test/litest-device-wacom-intuos-pro-3rd-pad.c diff --git a/meson.build b/meson.build -index 0c02b0de..bbe37d86 100644 +index 0db0d1da3aba..ac58c7a1d734 100644 --- a/meson.build +++ b/meson.build -@@ -855,6 +855,7 @@ if get_option('tests') +@@ -948,6 +948,7 @@ if get_option('tests') 'test/litest-device-wacom-cintiq-pro-16-pen.c', 'test/litest-device-wacom-ekr.c', 'test/litest-device-wacom-hid4800-pen.c', @@ -39,7 +39,7 @@ index 0c02b0de..bbe37d86 100644 'test/litest-device-wacom-intuos5-finger.c', 'test/litest-device-wacom-intuos5-pad.c', diff --git a/quirks/30-vendor-wacom.quirks b/quirks/30-vendor-wacom.quirks -index a7898b65..38fbc65e 100644 +index a7898b65ca1c..38fbc65e08ba 100644 --- a/quirks/30-vendor-wacom.quirks +++ b/quirks/30-vendor-wacom.quirks @@ -40,3 +40,45 @@ MatchBus=usb @@ -89,10 +89,10 @@ index a7898b65..38fbc65e 100644 +MatchProduct=0x03F5 +ModelWacomIntuosPro3rd=1 diff --git a/src/evdev-tablet-pad.c b/src/evdev-tablet-pad.c -index dc432a1c..1fe985a0 100644 +index 186def190a71..40552603f80d 100644 --- a/src/evdev-tablet-pad.c +++ b/src/evdev-tablet-pad.c -@@ -339,6 +339,30 @@ pad_strip_get_mode_group(struct pad_dispatch *pad, +@@ -354,6 +354,30 @@ pad_strip_get_mode_group(struct pad_dispatch *pad, unsigned int strip) return NULL; } @@ -123,30 +123,27 @@ index dc432a1c..1fe985a0 100644 static void pad_check_notify_axes(struct pad_dispatch *pad, struct evdev_device *device, -@@ -357,7 +381,7 @@ pad_check_notify_axes(struct pad_dispatch *pad, +@@ -372,18 +396,48 @@ pad_check_notify_axes(struct pad_dispatch *pad, /* Unlike the ring axis we don't get an event when we release * so we can't set a source */ - if (pad->changed_axes & PAD_AXIS_DIAL1) { + if (pad->changed_axes & PAD_AXIS_DIAL1 && !pad->dials.map_to_ring) { group = pad_dial_get_mode_group(pad, 0); - tablet_pad_notify_dial(base, - time, -@@ -366,7 +390,7 @@ pad_check_notify_axes(struct pad_dispatch *pad, - group); + if (group) + tablet_pad_notify_dial(base, time, 0, pad->dials.dial1, group); } - if (pad->changed_axes & PAD_AXIS_DIAL2) { + if (pad->changed_axes & PAD_AXIS_DIAL2 && !pad->dials.map_to_ring) { group = pad_dial_get_mode_group(pad, 1); - tablet_pad_notify_dial(base, - time, -@@ -375,6 +399,34 @@ pad_check_notify_axes(struct pad_dispatch *pad, - group); + if (group) + tablet_pad_notify_dial(base, time, 1, pad->dials.dial2, group); } + if (pad->changed_axes & PAD_AXIS_DIAL1 && pad->dials.map_to_ring) { -+ double degrees = pad_ring_to_dial(&pad->dials.abs_dial1_value, pad->dials.dial1); ++ double degrees = ++ pad_ring_to_dial(&pad->dials.abs_dial1_value, pad->dials.dial1); + if (device->left_handed.enabled) + degrees = fmod(degrees + 180, 360); + @@ -160,7 +157,8 @@ index dc432a1c..1fe985a0 100644 + } + + if (pad->changed_axes & PAD_AXIS_DIAL2 && pad->dials.map_to_ring) { -+ double degrees = pad_ring_to_dial(&pad->dials.abs_dial2_value, pad->dials.dial2); ++ double degrees = ++ pad_ring_to_dial(&pad->dials.abs_dial2_value, pad->dials.dial2); + if (device->left_handed.enabled) + degrees = fmod(degrees + 180, 360); + @@ -176,17 +174,18 @@ index dc432a1c..1fe985a0 100644 if (pad->changed_axes & PAD_AXIS_RING1) { value = pad_handle_ring(pad, device, ABS_WHEEL); if (send_finger_up) -@@ -807,6 +859,9 @@ pad_init(struct pad_dispatch *pad, struct evdev_device *device) - pad->status = PAD_NONE; +@@ -824,6 +878,10 @@ pad_init(struct pad_dispatch *pad, struct evdev_device *device) pad->changed_axes = PAD_AXIS_NONE; + ratelimit_init(&pad->modes.group_not_found, h2us(1), 3); + /* RHEL dial-to-ring special */ -+ pad->dials.map_to_ring = evdev_device_has_model_quirk(device, QUIRK_MODEL_WACOM_INTUOS_PRO_3RD); ++ pad->dials.map_to_ring = ++ evdev_device_has_model_quirk(device, QUIRK_MODEL_WACOM_INTUOS_PRO_3RD); + - /* We expect the kernel to either give us both axes as hires or neither. + /* We expect the kernel to either give us both axes as hires or neither. * Getting one is a kernel bug we don't need to care about */ - pad->dials.has_hires_dial = libevdev_has_event_code(device->evdev, EV_REL, REL_WHEEL_HI_RES) || -@@ -922,18 +977,15 @@ evdev_device_tablet_pad_get_num_buttons(struct evdev_device *device) + pad->dials.has_hires_dial = +@@ -890,24 +948,34 @@ evdev_device_tablet_pad_get_num_buttons(struct evdev_device *device) return pad->nbuttons; } @@ -205,12 +204,11 @@ index dc432a1c..1fe985a0 100644 + if (libevdev_has_event_code(evdev, EV_REL, REL_WHEEL) || + libevdev_has_event_code(evdev, EV_REL, REL_DIAL)) { ndials++; -- if (libevdev_has_event_code(device->evdev, -+ if (libevdev_has_event_code(evdev, - EV_REL, - REL_HWHEEL)) +- if (libevdev_has_event_code(device->evdev, EV_REL, REL_HWHEEL)) ++ if (libevdev_has_event_code(evdev, EV_REL, REL_HWHEEL)) ndials++; -@@ -942,6 +994,19 @@ evdev_device_tablet_pad_get_num_dials(struct evdev_device *device) + } + return ndials; } @@ -230,7 +228,7 @@ index dc432a1c..1fe985a0 100644 int evdev_device_tablet_pad_get_num_rings(struct evdev_device *device) { -@@ -950,6 +1015,10 @@ evdev_device_tablet_pad_get_num_rings(struct evdev_device *device) +@@ -916,6 +984,10 @@ evdev_device_tablet_pad_get_num_rings(struct evdev_device *device) if (!(device->seat_caps & EVDEV_DEVICE_TABLET_PAD)) return -1; @@ -240,9 +238,9 @@ index dc432a1c..1fe985a0 100644 + if (libevdev_has_event_code(device->evdev, EV_ABS, ABS_WHEEL)) { nrings++; - if (libevdev_has_event_code(device->evdev, + if (libevdev_has_event_code(device->evdev, EV_ABS, ABS_THROTTLE)) diff --git a/src/evdev-tablet-pad.h b/src/evdev-tablet-pad.h -index 2b767f58..53c963e0 100644 +index 27e9fbed47c3..4c9fef3200f5 100644 --- a/src/evdev-tablet-pad.h +++ b/src/evdev-tablet-pad.h @@ -83,6 +83,11 @@ struct pad_dispatch { @@ -258,32 +256,34 @@ index 2b767f58..53c963e0 100644 struct { diff --git a/src/quirks.c b/src/quirks.c -index 6d45f4ac..9da23a59 100644 +index 6364549c8708..c726e03eb131 100644 --- a/src/quirks.c +++ b/src/quirks.c -@@ -272,6 +272,7 @@ quirk_get_name(enum quirk q) - case QUIRK_MODEL_TOUCHPAD_PHANTOM_CLICKS: return "ModelTouchpadPhantomClicks"; - case QUIRK_MODEL_TRACKBALL: return "ModelTrackball"; - case QUIRK_MODEL_WACOM_TOUCHPAD: return "ModelWacomTouchpad"; -+ case QUIRK_MODEL_WACOM_INTUOS_PRO_3RD: return "ModelWacomIntuosPro3rd"; - case QUIRK_MODEL_PRESSURE_PAD: return "ModelPressurePad"; - - case QUIRK_ATTR_SIZE_HINT: return "AttrSizeHint"; +@@ -298,7 +298,8 @@ quirk_get_name(enum quirk q) + return "ModelWacomTouchpad"; + case QUIRK_MODEL_PRESSURE_PAD: + return "ModelPressurePad"; +- ++ case QUIRK_MODEL_WACOM_INTUOS_PRO_3RD: ++ return "ModelWacomIntuosPro3rd"; + case QUIRK_ATTR_SIZE_HINT: + return "AttrSizeHint"; + case QUIRK_ATTR_TOUCH_SIZE_RANGE: diff --git a/src/quirks.h b/src/quirks.h -index 340d0463..784084ef 100644 +index b6ea220a991c..22321d644f12 100644 --- a/src/quirks.h +++ b/src/quirks.h -@@ -85,6 +85,7 @@ enum quirk { - QUIRK_MODEL_TABLET_MODE_SWITCH_UNRELIABLE, +@@ -95,6 +95,7 @@ enum quirk { QUIRK_MODEL_TOUCHPAD_VISIBLE_MARKER, QUIRK_MODEL_TRACKBALL, -+ QUIRK_MODEL_WACOM_INTUOS_PRO_3RD, QUIRK_MODEL_WACOM_TOUCHPAD, - QUIRK_MODEL_PRESSURE_PAD, - QUIRK_MODEL_TOUCHPAD_PHANTOM_CLICKS, ++ QUIRK_MODEL_WACOM_INTUOS_PRO_3RD, + + _QUIRK_LAST_MODEL_QUIRK_, /* Guard: do not modify */ + diff --git a/test/litest-device-wacom-intuos-pro-3rd-pad.c b/test/litest-device-wacom-intuos-pro-3rd-pad.c new file mode 100644 -index 00000000..7ecc1c34 +index 000000000000..8efdcb16740b --- /dev/null +++ b/test/litest-device-wacom-intuos-pro-3rd-pad.c @@ -0,0 +1,86 @@ @@ -312,8 +312,8 @@ index 00000000..7ecc1c34 + +#include "config.h" + -+#include "litest.h" +#include "litest-int.h" ++#include "litest.h" + +static struct input_event down[] = { + { .type = -1, .code = -1 }, @@ -357,10 +357,11 @@ index 00000000..7ecc1c34 + EV_REL, REL_HWHEEL, + EV_REL, REL_WHEEL_HI_RES, + EV_REL, REL_HWHEEL_HI_RES, -+ -1, -1, ++ -1, -1, +}; + -+TEST_DEVICE(LITEST_WACOM_INTUOS_PRO_3RD_PAD, ++TEST_DEVICE( ++ LITEST_WACOM_INTUOS_PRO_3RD_PAD, + .features = LITEST_TABLET_PAD, /* RHEL: not LITEST_DIAL because it's special */ + .interface = &interface, + @@ -371,13 +372,12 @@ index 00000000..7ecc1c34 + .udev_properties = { + { "ID_INPUT_TABLET_PAD", "1" }, + { NULL }, -+ }, -+) ++ }, ) diff --git a/test/litest.h b/test/litest.h -index 57e68b40..80ae819b 100644 +index 9aa76f3c27ca..fe88be22e984 100644 --- a/test/litest.h +++ b/test/litest.h -@@ -471,6 +471,7 @@ enum litest_device_type { +@@ -532,6 +532,7 @@ enum litest_device_type { LITEST_WACOM_CINTIQ_PRO16_PEN, LITEST_WACOM_EKR, LITEST_WACOM_HID4800_PEN, @@ -385,45 +385,48 @@ index 57e68b40..80ae819b 100644 LITEST_WACOM_INTUOS3_PAD, LITEST_WACOM_INTUOS5_PAD, LITEST_WACOM_INTUOS5_PEN, -diff --git a/test/test-tablet.c b/test/test-tablet.c -index 90d36ebb..7104a433 100644 ---- a/test/test-tablet.c -+++ b/test/test-tablet.c -@@ -7216,6 +7216,62 @@ START_TEST(tablet_smoothing) +diff --git a/test/test-pad.c b/test/test-pad.c +index 6c3560d6bd38..2bac2f7866f1 100644 +--- a/test/test-pad.c ++++ b/test/test-pad.c +@@ -1147,6 +1147,67 @@ START_TEST(pad_send_events_disabled) } END_TEST -+START_TEST(tablet_dial_to_ring) ++START_TEST(pad_dial_to_ring) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + struct libinput_event *event; + struct libinput_event_tablet_pad *pev; + -+ /* The range is a bitmask of ring, direction, left-handed */ -+ int testcase = _i; /* ranged test */ -+ unsigned int ring = testcase & 0x1; -+ int direction = testcase & 0x2 ? -1 : 1; -+ bool left_handed = !!(testcase & 0x4); -+ -+ litest_assert_int_lt(testcase, 8); ++ unsigned int ring = litest_test_param_get_u32(test_env->params, "ring"); ++ int direction = litest_test_param_get_i32(test_env->params, "direction"); ++ bool left_handed = litest_test_param_get_bool(test_env->params, "left-handed"); + + const int degrees_per_detent = 15; + -+ litest_assert_int_eq(libinput_device_tablet_pad_get_num_dials(dev->libinput_device), 0); -+ litest_assert_int_eq(libinput_device_tablet_pad_get_num_rings(dev->libinput_device), 2); ++ litest_assert_int_eq( ++ libinput_device_tablet_pad_get_num_dials(dev->libinput_device), ++ 0); ++ litest_assert_int_eq( ++ libinput_device_tablet_pad_get_num_rings(dev->libinput_device), ++ 2); + + /* The dial-to-ring affected devices do not support left-handed so let's + * make sure setting left-handed a) doesn't work and b) the setting + * doesn't affect anything. + */ -+ enum libinput_config_status rc = libinput_device_config_left_handed_set(dev->libinput_device, left_handed); ++ enum libinput_config_status rc = ++ libinput_device_config_left_handed_set(dev->libinput_device, ++ left_handed); + litest_assert_int_eq(rc, (unsigned)LIBINPUT_CONFIG_STATUS_UNSUPPORTED); + + litest_drain_events(li); + + double expected = 0.0; -+ for (size_t count = 0; count < 36; count++) { /* 24 per 360 so let's do 1.5 rotations */ ++ for (size_t count = 0; count < 36; ++ count++) { /* 24 per 360 so let's do 1.5 rotations */ + if (ring == 0) { + /* REL_WHEEL is inverted to expectations */ + litest_event(dev, EV_REL, REL_WHEEL, 1 * -direction); @@ -441,7 +444,9 @@ index 90d36ebb..7104a433 100644 + expected = fmod(expected, 360); + + event = libinput_get_event(li); -+ pev = litest_is_pad_ring_event(event, ring, LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN); ++ pev = litest_is_pad_ring_event(event, ++ ring, ++ LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN); + double value = libinput_event_tablet_pad_get_ring_position(pev); + litest_assert_double_eq(value, expected); + libinput_event_destroy(event); @@ -449,19 +454,26 @@ index 90d36ebb..7104a433 100644 +} +END_TEST + - TEST_COLLECTION(tablet) + TEST_COLLECTION(pad) { - litest_add(tool_ref, LITEST_TABLET | LITEST_TOOL_SERIAL, LITEST_ANY); -@@ -7369,6 +7425,9 @@ TEST_COLLECTION(tablet) - } + /* clang-format off */ +@@ -1192,5 +1253,16 @@ TEST_COLLECTION(pad) + litest_add(pad_keys, LITEST_TABLET_PAD, LITEST_ANY); - litest_add_for_device(tablet_smoothing, LITEST_WACOM_HID4800_PEN); + litest_add(pad_send_events_disabled, LITEST_TABLET_PAD, LITEST_ANY); + -+ struct range dial_ring_cases = { 0, 8 }; -+ litest_add_ranged_for_device(tablet_dial_to_ring, LITEST_WACOM_INTUOS_PRO_3RD_PAD, &dial_ring_cases); ++ enum { ++ CCW = -1, ++ CW = 1, ++ }; ++ litest_with_parameters(params, ++ "ring", 'u', 2, 0, 1, ++ "direction", 'I', 2, litest_named_i32(CCW), litest_named_i32(CW), ++ "left-handed", 'b') { ++ litest_add_parametrized_for_device(pad_dial_to_ring, LITEST_WACOM_INTUOS_PRO_3RD_PAD, params); ++ } + /* clang-format on */ } - - TEST_COLLECTION(tablet_left_handed) -- 2.51.1 diff --git a/libinput.spec b/libinput.spec index 55b1140..0046da7 100644 --- a/libinput.spec +++ b/libinput.spec @@ -4,7 +4,7 @@ %global gitversion 58abea394 Name: libinput -Version: 1.28.1 +Version: 1.30.1 Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library @@ -76,6 +76,7 @@ intended to be run by users. -Ddocumentation=false \ -Dtests=true \ -Dinstall-tests=true \ + -Dlua-plugins=disabled \ -Dudev-dir=%{udevdir} %meson_build @@ -121,6 +122,7 @@ intended to be run by users. %{_libexecdir}/libinput/libinput-analyze-recording %{_libexecdir}/libinput/libinput-analyze-touch-down-state %{_libexecdir}/libinput/libinput-debug-tablet +%{_libexecdir}/libinput/libinput-debug-tablet-pad %{_libexecdir}/libinput/libinput-list-kernel-devices %{_libexecdir}/libinput/libinput-measure %{_libexecdir}/libinput/libinput-measure-fuzz @@ -137,6 +139,7 @@ intended to be run by users. %{_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-pad.1* %{_mandir}/man1/libinput-list-kernel-devices.1* %{_mandir}/man1/libinput-measure.1* %{_mandir}/man1/libinput-measure-fuzz.1* @@ -159,6 +162,10 @@ intended to be run by users. %changelog +* Wed Dec 17 2025 Peter Hutterer - 1.30.1-1 +- libinput 1.30.1 + Resolves: RHEL-136390 + * Wed Nov 05 2025 Florian Müllner - 1.28.1-1 - libinput 1.28.1 Resolves: RHEL-126613 diff --git a/sources b/sources index ed63a20..b53b11e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libinput-1.28.1.tar.bz2) = 354a91f2239da5e5bbb12bb7473bd1fb7adf69e6243e8da786ace9e80eda6c8f733620b5f1e20411c732fcfa4dedf5ccd2e722a78693e564a24771e80f1c72aa +SHA512 (libinput-1.30.1.tar.bz2) = 6d9bb5653dfeb0e30c64e92f8146a8908233162ef39f89114f619605b7f0de3f9e0f344412d91c809d3c1dc3d4b836a5709373a80191484db3c6d0a8f69c4f82