Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libinput for openSUSE:Factory checked in at 2024-01-15 22:15:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libinput (Old) and /work/SRC/openSUSE:Factory/.libinput.new.21961 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libinput" Mon Jan 15 22:15:20 2024 rev:117 rq:1138796 version:1.25.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libinput/libinput.changes 2023-08-30 10:21:14.185760824 +0200 +++ /work/SRC/openSUSE:Factory/.libinput.new.21961/libinput.changes 2024-01-15 22:16:49.849566978 +0100 @@ -1,0 +2,12 @@ +Mon Jan 15 09:57:24 UTC 2024 - Jan Engelhardt <jeng...@inai.de> + +- Update to release 1.25 + * Change how left-handed settings are handled for tablets: If + libwacom does not contain a definition for a tablet yet, + libinput defaults to enabling a left-handed setting. + * Quirks for laptops from Dell, Google, Graviton, HP, HUAWEI, + Lenovo and Razer, gadgets like the RollerMouse Pro3 and virtual + machines like GNOME Boxes, VirtualBox or Virtual Machine + Manager are included. + +------------------------------------------------------------------- Old: ---- libinput-1.24.0.tar.gz New: ---- libinput-1.25.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libinput.spec ++++++ --- /var/tmp/diff_new_pack.l42jHI/_old 2024-01-15 22:16:50.337584809 +0100 +++ /var/tmp/diff_new_pack.l42jHI/_new 2024-01-15 22:16:50.337584809 +0100 @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -37,7 +37,7 @@ %define lname libinput10 %define pname libinput Name: libinput%{?xsuffix} -Version: 1.24.0 +Version: 1.25.0 Release: 0 Summary: Input device and event processing library License: MIT ++++++ libinput-1.24.0.tar.gz -> libinput-1.25.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/.gitlab/issue_templates/Bug.md new/libinput-1.25.0/.gitlab/issue_templates/Bug.md --- old/libinput-1.24.0/.gitlab/issue_templates/Bug.md 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/.gitlab/issue_templates/Bug.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -## Summary - -<!-- -Summarize the bug encountered concisely. See -https://wayland.freedesktop.org/libinput/doc/latest/reporting-bugs.html for -detailed instructions to report bugs ---> - -## Steps to reproduce - -<!-- How to reproduce the issue on a developer machine - this is very important --> - -## Required information - -<!-- Note: if your libinput version is older than the current stable version, -please reproduce with a current version instead --> - -- libinput version: -- hardware information: -- `libinput record` output: do not paste, **attach** the file -- `libinput debug-events --verbose` output: do not paste, **attach the file** - -<!-- - -Paste any other relevant logs - please use code blocks (```) to format -console output, logs, and code as it's very hard to read otherwise.) - -Do not paste logs longer than 10 lines, **attach** those instead. - -If your libinput record is longer than 5-10s, we will not be able to process -it. - ---> - -/label ~"bug" ~"needs triage" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/.gitlab/issue_templates/default.md new/libinput-1.25.0/.gitlab/issue_templates/default.md --- old/libinput-1.24.0/.gitlab/issue_templates/default.md 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.25.0/.gitlab/issue_templates/default.md 2024-01-15 09:53:20.000000000 +0100 @@ -0,0 +1,35 @@ +## Summary + +<!-- +Summarize the bug encountered concisely. See +https://wayland.freedesktop.org/libinput/doc/latest/reporting-bugs.html for +detailed instructions to report bugs +--> + +## Steps to reproduce + +<!-- How to reproduce the issue on a developer machine - this is very important --> + +## Required information + +<!-- Note: if your libinput version is older than the current stable version, +please reproduce with a current version instead --> + +- libinput version: +- hardware information: +- `libinput record` output: do not paste, **attach** the file +- `libinput debug-events --verbose` output: do not paste, **attach the file** + +<!-- + +Paste any other relevant logs - please use code blocks (```) to format +console output, logs, and code as it's very hard to read otherwise.) + +Do not paste logs longer than 10 lines, **attach** those instead. + +If your libinput record is longer than 5-10s, we will not be able to process +it. + +--> + +/label ~"bug" ~"needs triage" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/.gitlab-ci/ci.template new/libinput-1.25.0/.gitlab-ci/ci.template --- old/libinput-1.24.0/.gitlab-ci/ci.template 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/.gitlab-ci/ci.template 2024-01-15 09:53:20.000000000 +0100 @@ -303,7 +303,6 @@ variables: MESON_BUILDDIR: build_dir B2C_KERNEL: {{ b2c.kernel }} - B2C_VERSION: {{ b2c.version }} B2C_IMAGE: $FDO_DISTRIBUTION_IMAGE B2C_COMMAND: .gitlab-ci/start-in-systemd.sh script: @@ -311,7 +310,7 @@ - .gitlab-ci/meson-build.sh --skip-test # pull b2c - - curl -L -o /app/boot2container https://gitlab.freedesktop.org/mupuf/boot2container/-/raw/{{b2c.version}}/vm2c.py + - curl -L -o /app/boot2container https://gitlab.freedesktop.org/gfx-ci/boot2container/-/raw/{{b2c.version}}/vm2c.py - chmod +x /app/boot2container # runs the test suite only @@ -557,7 +556,7 @@ extends: - .{{distro.name}}-build@template script: - - meson builddir + - meson setup builddir - meson introspect builddir --test | jq -r '.[].name' | grep 'libinput-test-suite' | sort > meson-testsuites - | cat <<EOF > ci-testsuites ; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/.gitlab-ci/config.yml new/libinput-1.25.0/.gitlab-ci/config.yml --- old/libinput-1.24.0/.gitlab-ci/config.yml 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/.gitlab-ci/config.yml 2024-01-15 09:53:20.000000000 +0100 @@ -208,5 +208,5 @@ - pointer b2c: - version: v0.9.9 - kernel: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.1/bzImage + version: 2ff65156ba67fa8a0c309a4fc16c5df1a88a3844 + kernel: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.5/bzImage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/.gitlab-ci.yml new/libinput-1.25.0/.gitlab-ci.yml --- old/libinput-1.24.0/.gitlab-ci.yml 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/.gitlab-ci.yml 2024-01-15 09:53:20.000000000 +0100 @@ -426,8 +426,7 @@ - kvm variables: MESON_BUILDDIR: build_dir - B2C_KERNEL: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.1/bzImage - B2C_VERSION: v0.9.9 + B2C_KERNEL: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.5/bzImage B2C_IMAGE: $FDO_DISTRIBUTION_IMAGE B2C_COMMAND: .gitlab-ci/start-in-systemd.sh script: @@ -435,7 +434,7 @@ - .gitlab-ci/meson-build.sh --skip-test # pull b2c - - curl -L -o /app/boot2container https://gitlab.freedesktop.org/mupuf/boot2container/-/raw/v0.9.9/vm2c.py + - curl -L -o /app/boot2container https://gitlab.freedesktop.org/gfx-ci/boot2container/-/raw/2ff65156ba67fa8a0c309a4fc16c5df1a88a3844/vm2c.py - chmod +x /app/boot2container # runs the test suite only @@ -839,7 +838,7 @@ extends: - .fedora-build@template script: - - meson builddir + - meson setup builddir - meson introspect builddir --test | jq -r '.[].name' | grep 'libinput-test-suite' | sort > meson-testsuites - | cat <<EOF > ci-testsuites ; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/.pre-commit-config.yaml new/libinput-1.25.0/.pre-commit-config.yaml --- old/libinput-1.24.0/.pre-commit-config.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.25.0/.pre-commit-config.yaml 2024-01-15 09:53:20.000000000 +0100 @@ -0,0 +1,23 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + - id: no-commit-to-branch + args: ['--branch', 'main'] +- repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black + args: ['--check', '--diff', '.'] +- repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.254 + hooks: + - id: ruff + args: ['--ignore=E741,E501', '.'] +- repo: https://gitlab.freedesktop.org/freedesktop/ci-templates.git + rev: 7402203527f61d6473d55ad701172d1606508c52 + hooks: + - id: check-commits + - id: generate-template diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/.triage-policies.yml new/libinput-1.25.0/.triage-policies.yml --- old/libinput-1.24.0/.triage-policies.yml 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/.triage-policies.yml 2024-01-15 09:53:20.000000000 +0100 @@ -22,6 +22,30 @@ Kernel bugs are usually best sent to the [`linux-input` list](https://lore.kernel.org/linux-input/). status: "close" + - name: "Request hid-recorder output" + conditions: + labels: + - "bugbot::hid-recorder" + actions: + remove_labels: + - "bugbot::hid-recorder" + comment: | + Looks like we may need some extra information that isn't yet available in this issue. + Please **attach** (do not paste) the output of `hid-recorder` from [hid-tools](https://gitlab.freedesktop.org/libevdev/hid-tools/) + for this device (run `sudo hid-recorder` without argument and it will let you pick the device). + This should show the data the kernel receives from the device and may provide a hint on what's going on here. + - name: "Request libinput record output" + conditions: + labels: + - "bugbot::libinput-record" + actions: + remove_labels: + - "bugbot::libinput-record" + comment: | + Looks like we may need some extra information. Please **attach** (do not paste) the full output + of `libinput record` and `libinput debug-events --verbose` (if you haven't yet). + The [documentation](https://wayland.freedesktop.org/libinput/doc/latest/tools.html#libinput-record-and-libinput-replay) + has some information on what we're looking for to be able to triage bugs. merge_requests: rules: - name: "Remind contributor of commit rules" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/completion/zsh/_libinput new/libinput-1.25.0/completion/zsh/_libinput --- old/libinput-1.24.0/completion/zsh/_libinput 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/completion/zsh/_libinput 2024-01-15 09:53:20.000000000 +0100 @@ -78,7 +78,7 @@ '--disable-middlebutton[Disable middle button emulation]' \ + '(dwt)' \ '--enable-dwt[Enable disable-while-typing]' \ - '--disable-dwt[Disable disable-while-typing]' + '--disable-dwt[Disable disable-while-typing]' \ + '(dwtp)' \ '--enable-dwtp[Enable disable-while-trackpointing]' \ '--disable-dwtp[Disable disable-while-trackpointing]' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/doc/user/building.rst new/libinput-1.25.0/doc/user/building.rst --- old/libinput-1.24.0/doc/user/building.rst 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/doc/user/building.rst 2024-01-15 09:53:20.000000000 +0100 @@ -55,7 +55,7 @@ $> git clone https://gitlab.freedesktop.org/libinput/libinput $> cd libinput - $> meson --prefix=/usr builddir/ + $> meson setup --prefix=/usr builddir/ $> ninja -C builddir/ $> sudo ninja -C builddir/ install @@ -71,7 +71,7 @@ :: - $> meson --prefix=/usr -Ddocumentation=false builddir/ + $> meson setup --prefix=/usr -Ddocumentation=false builddir/ We recommend that users disable the documentation, it's not usually required @@ -96,7 +96,7 @@ :: $> rm -r builddir/ - $> meson --prefix=.... + $> meson setup --prefix=.... .. _verifying_install: @@ -242,7 +242,7 @@ more build dependencies. On systems where build dependencies are an issue, options may be disabled with this meson command: :: - meson --prefix=/usr -Dsomefeature=false builddir + meson setup --prefix=/usr -Dsomefeature=false builddir Where ``-Dsomefeature=false`` may be one of: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/doc/user/contributing.rst new/libinput-1.25.0/doc/user/contributing.rst --- old/libinput-1.24.0/doc/user/contributing.rst 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/doc/user/contributing.rst 2024-01-15 09:53:20.000000000 +0100 @@ -69,7 +69,7 @@ $> git clone https://gitlab.freedesktop.org/libinput/libinput $> cd libinput - $> meson --prefix=/usr builddir/ + $> meson setup --prefix=/usr builddir/ $> ninja -C builddir/ $> sudo ninja -C builddir/ install @@ -79,6 +79,15 @@ Working on the code ------------------------------------------------------------------------------ +If you are planning to send patches, it's a good idea to set up +`pre-commit <https://pre-commit.com/>`_ with these commands:: + + $> pre-commit install + $> pre-commit install --hook-type pre-push + +This will check a few things before you commit and/or push to your repos to +reduce the turnaround time for some common mistakes. + libinput has a roughly three-parts architecture: - the front-end code which handles the ``libinput_some_function()`` API calls in ``libinput.c`` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/doc/user/device-configuration-via-udev.rst new/libinput-1.25.0/doc/user/device-configuration-via-udev.rst --- old/libinput-1.24.0/doc/user/device-configuration-via-udev.rst 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/doc/user/device-configuration-via-udev.rst 2024-01-15 09:53:20.000000000 +0100 @@ -71,7 +71,7 @@ ``0x012a`` with the model ID of ``0x034b``. :: $ cat /etc/udev/rules.d/99-my-device-is-on-seat1.rules - ACTION=="add|change", KERNEL=="event[0-9]*", \ + ACTION!="remove", KERNEL=="event[0-9]*", \ ENV{ID_VENDOR_ID}=="012a", \ ENV{ID_MODEL_ID}=="034b", \ ENV{ID_SEAT}="seat1" @@ -102,7 +102,7 @@ for a device with the vendor/model ID of ``012a``/``034b``. :: $ cat /etc/udev/rules.d/99-my-device-is-a-tablet.rules - ACTION=="add|change", KERNEL=="event[0-9]*", \ + ACTION!="remove", KERNEL=="event[0-9]*", \ ENV{ID_VENDOR_ID}=="012a", \ ENV{ID_MODEL_ID}=="034b", \ ENV{ID_INPUT_TOUCHPAD}="", ENV{ID_INPUT_TABLET}="1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/doc/user/device-quirks.rst new/libinput-1.25.0/doc/user/device-quirks.rst --- old/libinput-1.24.0/doc/user/device-quirks.rst 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/doc/user/device-quirks.rst 2024-01-15 09:53:20.000000000 +0100 @@ -161,11 +161,15 @@ Specifies the touch size required to trigger a press (N) and to trigger a release (M). O > N > M. See :ref:`touchpad_touch_size_hwdb` for more details. + An AttrPalmSizeThreshold of zero unsets any threshold that has been + inherited from another quirk. AttrPressureRange=N:M, AttrPalmPressureThreshold=O, AttrThumbPressureThreshold=P Specifies the touch pressure required to trigger a press (N) and to trigger a release (M), when a palm touch is triggered (O) and when a thumb touch is triggered (P). O > P > N > M. See :ref:`touchpad_pressure_hwdb` for more details. + An AttrPalmPressureThreshold of zero unsets any threshold that has been + inherited from another quirk. AttrLidSwitchReliability=reliable|unreliable|write_open Indicates the reliability of the lid switch. This is a string enum. Very few devices need this, if in doubt do not set. See :ref:`switches_lid` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/doc/user/faqs.rst new/libinput-1.25.0/doc/user/faqs.rst --- old/libinput-1.24.0/doc/user/faqs.rst 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/doc/user/faqs.rst 2024-01-15 09:53:20.000000000 +0100 @@ -359,3 +359,20 @@ The only way to modify libinput's behavior is to use the configuration options exposed by the respective compositor. Those affect the libinput context inside the compositor and thus have an effect on the input device behavior. + +------------------------------------------------------------------------------ +Can I configure scroll speed? +------------------------------------------------------------------------------ + +No, or at least, not as a libinput option. + +When using a mouse, libinput notifies callers about physical scroll wheel +movement. When using another device, libinput notifies scroll in scroll units. + +It is up to the caller to transform those events into a number of pixels to +scroll and, if desired, provide a way to adjust scroll speed. + +This transformation cannot be done in libinput because it may depend on context +only known by the caller. For example, a caller may want to scroll faster +depending on how many pages a document has or depending on the widget that +receives the scroll events. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/doc/user/tablet-support.rst new/libinput-1.25.0/doc/user/tablet-support.rst --- old/libinput-1.24.0/doc/user/tablet-support.rst 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/doc/user/tablet-support.rst 2024-01-15 09:53:20.000000000 +0100 @@ -421,4 +421,3 @@ libinput uses the **libinput_device_group** to decide on touch arbitration and automatically discards touch events whenever a tool is in proximity. The exact behavior is device-dependent. - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/doc/user/test-suite.rst new/libinput-1.25.0/doc/user/test-suite.rst --- old/libinput-1.24.0/doc/user/test-suite.rst 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/doc/user/test-suite.rst 2024-01-15 09:53:20.000000000 +0100 @@ -208,7 +208,7 @@ To configure libinput to install the tests, use the ``-Dinstall-tests=true`` meson option:: - $ meson builddir -Dtests=true -Dinstall-tests=true <other options> + $ meson setup builddir -Dtests=true -Dinstall-tests=true <other options> .. _test-meson-suites: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/meson.build new/libinput-1.25.0/meson.build --- old/libinput-1.24.0/meson.build 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/meson.build 2024-01-15 09:53:20.000000000 +0100 @@ -1,8 +1,8 @@ project('libinput', 'c', - version : '1.24.0', + version : '1.25.0', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], - meson_version : '>= 0.49.0') + meson_version : '>= 0.56.0') libinput_version = meson.project_version().split('.') @@ -701,7 +701,7 @@ dependencies : [ dep_libinput, dep_libinput_util ], install : false) # test including from C++ (in case CPP compiler is available) -if add_languages('cpp', required: false) +if add_languages('cpp', native: false, required: false) executable('test-build-cxx', 'test/build-cxx.cc', dependencies : [dep_udev], @@ -796,6 +796,7 @@ 'test/litest-device-thinkpad-extrabuttons.c', 'test/litest-device-trackpoint.c', 'test/litest-device-touch-screen.c', + 'test/litest-device-touchpad-palm-threshold-zero.c', 'test/litest-device-touchscreen-invalid-range.c', 'test/litest-device-touchscreen-fuzz.c', 'test/litest-device-touchscreen-mt-tool.c', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/30-vendor-contour.quirks new/libinput-1.25.0/quirks/30-vendor-contour.quirks --- old/libinput-1.24.0/quirks/30-vendor-contour.quirks 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/quirks/30-vendor-contour.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -21,3 +21,9 @@ MatchProduct=0x1004 MatchUdevType=mouse ModelBouncingKeys=1 + +[Contour Design RollerMouse Pro3] +MatchVendor=0x0B33 +MatchProduct=0x0703 +MatchUdevType=mouse +ModelBouncingKeys=1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/30-vendor-oracle.quirks new/libinput-1.25.0/quirks/30-vendor-oracle.quirks --- old/libinput-1.24.0/quirks/30-vendor-oracle.quirks 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.25.0/quirks/30-vendor-oracle.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -0,0 +1,3 @@ +[VirtualBox mouse integration] +MatchName=*VirtualBox mouse integration* +ModelBouncingKeys=1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/30-vendor-qemu.quirks new/libinput-1.25.0/quirks/30-vendor-qemu.quirks --- old/libinput-1.24.0/quirks/30-vendor-qemu.quirks 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.25.0/quirks/30-vendor-qemu.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -0,0 +1,3 @@ +[QEMU/KVM mouse integration] +MatchName=*spice vdagent tablet* +ModelBouncingKeys=1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/30-vendor-razer.quirks new/libinput-1.25.0/quirks/30-vendor-razer.quirks --- old/libinput-1.24.0/quirks/30-vendor-razer.quirks 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/quirks/30-vendor-razer.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -261,3 +261,16 @@ MatchProduct=0x029E AttrKeyboardIntegration=internal +[RazerBlade162023 Keyboard] +MatchUdevType=keyboard +MatchBus=usb +MatchVendor=0x1532 +MatchProduct=0x029F +AttrKeyboardIntegration=internal + +[RazerBlade182023 Keyboard] +MatchUdevType=keyboard +MatchBus=usb +MatchVendor=0x1532 +MatchProduct=0x02A0 +AttrKeyboardIntegration=internal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/50-framework.quirks new/libinput-1.25.0/quirks/50-framework.quirks --- old/libinput-1.24.0/quirks/50-framework.quirks 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/quirks/50-framework.quirks 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -[Framework Laptop Touchpad] -MatchName=PIXA3854:00 093A:0274 Touchpad -MatchUdevType=touchpad -MatchDMIModalias=dmi:*svnFramework:pnLaptop* -AttrEventCode=-BTN_RIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/50-system-dell.quirks new/libinput-1.25.0/quirks/50-system-dell.quirks --- old/libinput-1.24.0/quirks/50-system-dell.quirks 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/quirks/50-system-dell.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -84,6 +84,11 @@ MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE7470* AttrTrackpointMultiplier=0.125 +[Latitude 7275] +MatchName=*AT Translated Set 2 keyboard* +MatchDMIModalias=dmi:*:svnDellInc.:pnLatitude7275:* +ModelTabletModeNoSuspend=1 + [Latitude 7480 Touchpad] MatchName=DLL07A0* MatchDMIModalias=dmi:**bvnDellInc.:*:pnLatitude7480* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/50-system-framework.quirks new/libinput-1.25.0/quirks/50-system-framework.quirks --- old/libinput-1.24.0/quirks/50-system-framework.quirks 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.25.0/quirks/50-system-framework.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -0,0 +1,5 @@ +[Framework Laptop Touchpad] +MatchName=PIXA3854:00 093A:0274 Touchpad +MatchUdevType=touchpad +MatchDMIModalias=dmi:*svnFramework:pnLaptop* +AttrEventCode=-BTN_RIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/50-system-google.quirks new/libinput-1.25.0/quirks/50-system-google.quirks --- old/libinput-1.24.0/quirks/50-system-google.quirks 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/quirks/50-system-google.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -111,3 +111,19 @@ MatchName=*cros_ec* MatchDeviceTree=*lazor* AttrKeyboardIntegration=internal + +[Google Chromebook Redrix] +MatchUdevType=touchpad +MatchName=ELAN2703:00 04F3:323B Touchpad +MatchDMIModalias=dmi:*pn*Redrix* +ModelChromebook=1 +AttrPressureRange=-0:-2 +AttrThumbPressureThreshold=45 +AttrPalmPressureThreshold=0 + +[Google Chromebook Drobit] +MatchUdevType=touchpad +MatchName=ELAN2701:00 04F3:31C6 Touchpad +MatchDMIModalias=dmi:*svnGoogle:*pnDrobit* +ModelChromebook=1 +AttrPressureRange=6:4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/50-system-graviton.quirks new/libinput-1.25.0/quirks/50-system-graviton.quirks --- old/libinput-1.24.0/quirks/50-system-graviton.quirks 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.25.0/quirks/50-system-graviton.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -0,0 +1,6 @@ +# Touchpad is not a clickpad but INPUT_PROP_BUTTONPAD is set +[Synaptics ALPS0001:00 0911:5288 Touchpad] +MatchUdevType=touchpad +MatchName=ALPS0001:00 0911:5288 Touchpad +AttrInputProp=-INPUT_PROP_BUTTONPAD +AttrEventCode=+BTN_RIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/50-system-huawei.quirks new/libinput-1.25.0/quirks/50-system-huawei.quirks --- old/libinput-1.24.0/quirks/50-system-huawei.quirks 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/quirks/50-system-huawei.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -5,3 +5,9 @@ MatchUdevType=touchpad MatchDMIModalias=dmi:*svnHUAWEI:*pvrM1010* AttrEventCode=-BTN_RIGHT + +[Huawei MateBook X Pro 2022 Touchpad] +MatchName=GXTP7863:00 27C6:01E0 Touchpad +MatchUdevType=touchpad +MatchDMIModalias=dmi:*svnHUAWEI:*pnMRGF-XX* +AttrEventCode=-BTN_RIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/quirks/50-system-lenovo.quirks new/libinput-1.25.0/quirks/50-system-lenovo.quirks --- old/libinput-1.24.0/quirks/50-system-lenovo.quirks 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/quirks/50-system-lenovo.quirks 2024-01-15 09:53:20.000000000 +0100 @@ -5,12 +5,6 @@ MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad*:* AttrThumbPressureThreshold=100 -[Lenovo ThinkPad 13 2nd Generation TrackPoint] -MatchUdevType=pointingstick -MatchName=*ETPS/2 Elantech TrackPoint* -MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad132ndGen* -AttrTrackpointMultiplier=1.75 - [Lenovo x230 Touchpad] MatchName=*SynPS/2 Synaptics TouchPad MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230* @@ -247,6 +241,15 @@ MatchProduct=0xC100 AttrKeyboardIntegration=internal +# Tested on Legion 5 15ARH7H, should also work for Legion 5 Pro 16ARH7H +# 048d:c102 Integrated Technology Express, Inc. ITE Device(8910) +[Lenovo Legion 5 Keyboard (C102)] +MatchUdevType=keyboard +MatchBus=usb +MatchVendor=0x048D +MatchProduct=0xC102 +AttrKeyboardIntegration=internal + [Lenovo Legion 5 Keyboard (C955)] MatchUdevType=keyboard MatchBus=usb @@ -321,3 +324,17 @@ MatchBus=usb MatchDMIModalias=dmi:*svnLENOVO:*:pvrLegionY9000PIRX8H* AttrKeyboardIntegration=internal + +[Lenovo LOQ 15IRH8 Keyboard] +MatchUdevType=keyboard +MatchBus=usb +MatchVendor=0x048D +MatchProduct=0xC986 +AttrKeyboardIntegration=internal + +[Lenovo ThinkPad E14 v2] +MatchUdevType=touchpad +MatchName=*Elan Touchpad +MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadE14Gen2* +AttrPalmPressureThreshold=300 +AttrPressureRange=10:8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/src/evdev-fallback.c new/libinput-1.25.0/src/evdev-fallback.c --- old/libinput-1.24.0/src/evdev-fallback.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/src/evdev-fallback.c 2024-01-15 09:53:20.000000000 +0100 @@ -968,9 +968,17 @@ uint64_t time) { struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch); + static bool warned = false; - if (dispatch->arbitration.in_arbitration) + if (dispatch->arbitration.in_arbitration) { + if (!warned) { + evdev_log_debug(device, "dropping events due to touch arbitration\n"); + warned = true; + } return; + } + + warned = false; switch (event->type) { case EV_REL: @@ -1188,6 +1196,7 @@ { struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch); struct device_coord_rect rect = {0}; + const char *state = NULL; if (which == dispatch->arbitration.state) return; @@ -1203,20 +1212,25 @@ * event is caught as palm touch. */ libinput_timer_set(&dispatch->arbitration.arbitration_timer, time + ms2us(90)); + state = "not-active"; break; case ARBITRATION_IGNORE_RECT: assert(phys_rect); rect = evdev_phys_rect_to_units(device, phys_rect); cancel_touches(dispatch, device, &rect, time); dispatch->arbitration.rect = rect; + state = "ignore-rect"; break; case ARBITRATION_IGNORE_ALL: libinput_timer_cancel(&dispatch->arbitration.arbitration_timer); fallback_return_to_neutral_state(dispatch, device); dispatch->arbitration.in_arbitration = true; + state = "ignore-all"; break; } + evdev_log_debug(device, "Touch arbitration state now %s\n", state); + dispatch->arbitration.state = which; } @@ -1621,6 +1635,8 @@ if (dispatch->arbitration.in_arbitration) dispatch->arbitration.in_arbitration = false; + + evdev_log_debug(dispatch->device, "touch arbitration timeout\n"); } static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/src/evdev-mt-touchpad.c new/libinput-1.25.0/src/evdev-mt-touchpad.c --- old/libinput-1.24.0/src/evdev-mt-touchpad.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/src/evdev-mt-touchpad.c 2024-01-15 09:53:20.000000000 +0100 @@ -34,6 +34,7 @@ #include "quirks.h" #include "evdev-mt-touchpad.h" +#include "util-input-event.h" #define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT ms2us(300) #define DEFAULT_TRACKPOINT_EVENT_TIMEOUT ms2us(40) @@ -3408,11 +3409,13 @@ } tp->palm.pressure_threshold = tp_read_palm_pressure_prop(tp, device); - tp->palm.use_pressure = true; + if (tp->palm.pressure_threshold != 0) { + tp->palm.use_pressure = true; - evdev_log_debug(device, - "palm: pressure threshold is %d\n", - tp->palm.pressure_threshold); + evdev_log_debug(device, + "palm: pressure threshold is %d\n", + tp->palm.pressure_threshold); + } } static inline void @@ -3429,11 +3432,7 @@ return; if (quirks_get_uint32(q, QUIRK_ATTR_PALM_SIZE_THRESHOLD, &threshold)) { - if (threshold == 0) { - evdev_log_bug_client(device, - "palm: ignoring invalid threshold %d\n", - threshold); - } else { + if (threshold != 0) { tp->palm.use_size = true; tp->palm.size_threshold = threshold; } @@ -3629,7 +3628,7 @@ goto out; } } else { - unsigned int range = abs->maximum - abs->minimum; + double range = absinfo_range(abs); /* Approximately the synaptics defaults */ hi = abs->minimum + 0.12 * range; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/src/evdev-tablet-pad.c new/libinput-1.25.0/src/evdev-tablet-pad.c --- old/libinput-1.24.0/src/evdev-tablet-pad.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/src/evdev-tablet-pad.c 2024-01-15 09:53:20.000000000 +0100 @@ -23,6 +23,7 @@ #include "config.h" #include "evdev-tablet-pad.h" +#include "util-input-event.h" #include <assert.h> #include <stdbool.h> @@ -151,7 +152,7 @@ current logical rotation, increasing clockwise to 1. Wacom has 0 on the left-most wheel position. */ - double range = absinfo->maximum - absinfo->minimum + 1; + double range = absinfo_range(absinfo); double value = (absinfo->value - absinfo->minimum) / range - 0.25; if (value < 0.0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/src/evdev-tablet.c new/libinput-1.25.0/src/evdev-tablet.c --- old/libinput-1.24.0/src/evdev-tablet.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/src/evdev-tablet.c 2024-01-15 09:53:20.000000000 +0100 @@ -23,6 +23,7 @@ */ #include "config.h" #include "evdev-tablet.h" +#include "util-input-event.h" #include <assert.h> #include <stdbool.h> @@ -334,8 +335,7 @@ static inline double normalize_slider(const struct input_absinfo *absinfo) { - double range = absinfo->maximum - absinfo->minimum; - double value = (absinfo->value - absinfo->minimum) / range; + double value = (absinfo->value - absinfo->minimum) / absinfo_range(absinfo); return value * 2 - 1; } @@ -343,8 +343,7 @@ static inline double normalize_distance(const struct input_absinfo *absinfo) { - double range = absinfo->maximum - absinfo->minimum; - double value = (absinfo->value - absinfo->minimum) / range; + double value = (absinfo->value - absinfo->minimum) / absinfo_range(absinfo); return value; } @@ -365,7 +364,7 @@ * threshold is 0 pressure. */ int base = tool->pressure.threshold.lower; - double range = absinfo->maximum - base; + double range = absinfo->maximum - base + 1; double value = (absinfo->value - base) / range; return max(0.0, value); @@ -374,8 +373,7 @@ static inline double adjust_tilt(const struct input_absinfo *absinfo) { - double range = absinfo->maximum - absinfo->minimum; - double value = (absinfo->value - absinfo->minimum) / range; + double value = (absinfo->value - absinfo->minimum) / absinfo_range(absinfo); const int WACOM_MAX_DEGREES = 64; /* If resolution is nonzero, it's in units/radian. But require @@ -433,8 +431,7 @@ convert_to_degrees(const struct input_absinfo *absinfo, double offset) { /* range is [0, 360[, i.e. range + 1 */ - double range = absinfo->maximum - absinfo->minimum + 1; - double value = (absinfo->value - absinfo->minimum) / range; + double value = (absinfo->value - absinfo->minimum) / absinfo_range(absinfo); return fmod(value * 360.0 + offset, 360.0); } @@ -1077,7 +1074,7 @@ static inline int axis_range_percentage(const struct input_absinfo *a, double percent) { - return (a->maximum - a->minimum) * percent/100.0 + a->minimum; + return absinfo_range(a) * percent/100.0 + a->minimum; } static inline void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/src/evdev.c new/libinput-1.25.0/src/evdev.c --- old/libinput-1.24.0/src/evdev.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/src/evdev.c 2024-01-15 09:53:20.000000000 +0100 @@ -129,14 +129,20 @@ int code, int pressed) { - int key_count; + int key_count = 0; assert(code >= 0 && code < KEY_CNT); if (pressed) { key_count = ++device->key_count[code]; } else { - assert(device->key_count[code] > 0); - key_count = --device->key_count[code]; + if (device->key_count[code] > 0) { + key_count = --device->key_count[code]; + } else { + evdev_log_bug_libinput(device, + "releasing key %s with count %d\n", + libevdev_event_code_get_name(EV_KEY, code), + device->key_count[code]); + } } if (key_count > 32) { @@ -378,8 +384,7 @@ static inline double scale_axis(const struct input_absinfo *absinfo, double val, double to_range) { - return (val - absinfo->minimum) * to_range / - (absinfo->maximum - absinfo->minimum + 1); + return (val - absinfo->minimum) * to_range / absinfo_range(absinfo); } double @@ -1673,8 +1678,8 @@ */ if (!evdev_read_attr_res_prop(device, &xres, &yres) && evdev_read_attr_size_prop(device, &widthmm, &heightmm)) { - xres = (absx->maximum - absx->minimum)/widthmm; - yres = (absy->maximum - absy->minimum)/heightmm; + xres = absinfo_range(absx)/widthmm; + yres = absinfo_range(absy)/heightmm; } /* libevdev_set_abs_resolution() changes the absinfo we already @@ -1843,10 +1848,8 @@ device->abs.absinfo_x = libevdev_get_abs_info(evdev, ABS_X); device->abs.absinfo_y = libevdev_get_abs_info(evdev, ABS_Y); - device->abs.dimensions.x = abs(device->abs.absinfo_x->maximum - - device->abs.absinfo_x->minimum); - device->abs.dimensions.y = abs(device->abs.absinfo_y->maximum - - device->abs.absinfo_y->minimum); + device->abs.dimensions.x = abs((int)absinfo_range(device->abs.absinfo_x)); + device->abs.dimensions.y = abs((int)absinfo_range(device->abs.absinfo_y)); if (evdev_is_fake_mt_device(device) || !libevdev_has_event_code(evdev, EV_ABS, ABS_MT_POSITION_X) || @@ -1865,10 +1868,8 @@ device->abs.absinfo_x = libevdev_get_abs_info(evdev, ABS_MT_POSITION_X); device->abs.absinfo_y = libevdev_get_abs_info(evdev, ABS_MT_POSITION_Y); - device->abs.dimensions.x = abs(device->abs.absinfo_x->maximum - - device->abs.absinfo_x->minimum); - device->abs.dimensions.y = abs(device->abs.absinfo_y->maximum - - device->abs.absinfo_y->minimum); + device->abs.dimensions.x = abs((int)absinfo_range(device->abs.absinfo_x)); + device->abs.dimensions.y = abs((int)absinfo_range(device->abs.absinfo_y)); device->is_mt = 1; } @@ -2562,8 +2563,8 @@ return; } - sx = device->abs.absinfo_x->maximum - device->abs.absinfo_x->minimum + 1; - sy = device->abs.absinfo_y->maximum - device->abs.absinfo_y->minimum + 1; + sx = absinfo_range(device->abs.absinfo_x); + sy = absinfo_range(device->abs.absinfo_y); /* The transformation matrix is in the form: * [ a b c ] @@ -3119,7 +3120,7 @@ bool evdev_tablet_has_left_handed(struct evdev_device *device) { - bool has_left_handed = false; + bool has_left_handed = true; #if HAVE_LIBWACOM struct libinput *li = evdev_libinput_context(device); WacomDeviceDatabase *db = NULL; @@ -3140,8 +3141,7 @@ error); if (d) { - if (libwacom_is_reversible(d)) - has_left_handed = true; + has_left_handed = !!libwacom_is_reversible(d); } else if (libwacom_error_get_code(error) == WERROR_UNKNOWN_MODEL) { evdev_log_info(device, "tablet '%s' unknown to libwacom\n", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/src/util-input-event.h new/libinput-1.25.0/src/util-input-event.h --- old/libinput-1.24.0/src/util-input-event.h 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/src/util-input-event.h 2024-01-15 09:53:20.000000000 +0100 @@ -66,3 +66,9 @@ e->input_event_sec = tval.tv_sec; e->input_event_usec = tval.tv_usec; } + +static inline double +absinfo_range(const struct input_absinfo *abs) +{ + return (double)(abs->maximum - abs->minimum + 1); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/test/litest-device-touchpad-palm-threshold-zero.c new/libinput-1.25.0/test/litest-device-touchpad-palm-threshold-zero.c --- old/libinput-1.24.0/test/litest-device-touchpad-palm-threshold-zero.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.25.0/test/litest-device-touchpad-palm-threshold-zero.c 2024-01-15 09:53:20.000000000 +0100 @@ -0,0 +1,123 @@ +/* + * Copyright © 2015 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "config.h" + +#include "litest.h" +#include "litest-int.h" + +static struct input_event down[] = { + { .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_PRESSURE, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_PRESSURE, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, + { .type = -1, .code = -1 }, +}; + +static struct input_event move[] = { + { .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_PRESSURE, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_PRESSURE, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, + { .type = -1, .code = -1 }, +}; + +static int +get_axis_default(struct litest_device *d, unsigned int evcode, int32_t *value) +{ + switch (evcode) { + case ABS_PRESSURE: + case ABS_MT_PRESSURE: + *value = 30; + return 0; + } + return 1; +} + +static struct litest_device_interface interface = { + .touch_down_events = down, + .touch_move_events = move, + + .get_axis_default = get_axis_default, +}; + +static struct input_id input_id = { + .bustype = 0x11, + .vendor = 0x2, + .product = 0x7, +}; + +static int events[] = { + EV_KEY, BTN_LEFT, + EV_KEY, BTN_TOOL_FINGER, + EV_KEY, BTN_TOOL_QUINTTAP, + EV_KEY, BTN_TOUCH, + EV_KEY, BTN_TOOL_DOUBLETAP, + EV_KEY, BTN_TOOL_TRIPLETAP, + EV_KEY, BTN_TOOL_QUADTAP, + EV_KEY, BTN_0, + EV_KEY, BTN_1, + EV_KEY, BTN_2, + INPUT_PROP_MAX, INPUT_PROP_POINTER, + INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, + -1, -1, +}; + +static struct input_absinfo absinfo[] = { + { ABS_X, 1266, 5676, 0, 0, 45 }, + { ABS_Y, 1096, 4758, 0, 0, 68 }, + { ABS_PRESSURE, 0, 255, 0, 0, 0 }, + { ABS_TOOL_WIDTH, 0, 15, 0, 0, 0 }, + { ABS_MT_SLOT, 0, 1, 0, 0, 0 }, + { ABS_MT_POSITION_X, 1266, 5676, 0, 0, 45 }, + { ABS_MT_POSITION_Y, 1096, 4758, 0, 0, 68 }, + { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, + { ABS_MT_PRESSURE, 0, 255, 0, 0, 0 }, + { .value = -1 } +}; + +static const char quirk_file[] = +"[litest TouchpadPalmPressure Zero]\n" +"MatchName=litest Touchpad PalmPressureThreshold 0\n" +"AttrPalmPressureThreshold=0\n"; + +TEST_DEVICE("touchpad-palmpressure-zero", + .type = LITEST_TOUCHPAD_PALMPRESSURE_ZERO, + .features = LITEST_IGNORED, /* Only use for specific tests */ + .interface = &interface, + + .name = "Touchpad PalmPressureThreshold 0", + .id = &input_id, + .events = events, + .absinfo = absinfo, + .quirk_file = quirk_file, +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/test/litest.h new/libinput-1.25.0/test/litest.h --- old/libinput-1.24.0/test/litest.h 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/test/litest.h 2024-01-15 09:53:20.000000000 +0100 @@ -231,104 +231,116 @@ enum litest_device_type { LITEST_NO_DEVICE = -1, - LITEST_SYNAPTICS_CLICKPAD_X220 = -1000, - LITEST_SYNAPTICS_TOUCHPAD, - LITEST_SYNAPTICS_TOPBUTTONPAD, - LITEST_BCM5974, - LITEST_KEYBOARD, - LITEST_TRACKPOINT, - LITEST_MOUSE, - LITEST_WACOM_TOUCH, + /* Touchpads and associated devices */ + LITEST_ACER_HAWAII_TOUCHPAD = -1000, + LITEST_AIPTEK, + LITEST_ALPS_3FG, + LITEST_ALPS_DUALPOINT, LITEST_ALPS_SEMI_MT, - LITEST_GENERIC_SINGLETOUCH, - LITEST_MS_SURFACE_COVER, - LITEST_QEMU_TABLET, - LITEST_XEN_VIRTUAL_POINTER, - LITEST_VMWARE_VIRTMOUSE, + LITEST_APPLETOUCH, + LITEST_ATMEL_HOVER, + LITEST_BCM5974, + LITEST_ELANTECH_TOUCHPAD, + LITEST_GENERIC_PRESSUREPAD, + LITEST_MAGIC_TRACKPAD, + LITEST_SYNAPTICS_CLICKPAD_X220, LITEST_SYNAPTICS_HOVER_SEMI_MT, - LITEST_SYNAPTICS_TRACKPOINT_BUTTONS, - LITEST_PROTOCOL_A_SCREEN, + LITEST_SYNAPTICS_I2C, + LITEST_SYNAPTICS_PHANTOMCLICKS, + LITEST_SYNAPTICS_PRESSUREPAD, + LITEST_SYNAPTICS_RMI4, + LITEST_SYNAPTICS_TOPBUTTONPAD, + LITEST_SYNAPTICS_TOUCHPAD, + LITEST_TOUCHPAD_PALMPRESSURE_ZERO, LITEST_WACOM_FINGER, - LITEST_KEYBOARD_BLACKWIDOW, - LITEST_WHEEL_ONLY, - LITEST_MOUSE_ROCCAT, - LITEST_LOGITECH_TRACKBALL, - LITEST_ATMEL_HOVER, - LITEST_ALPS_DUALPOINT, - LITEST_MOUSE_LOW_DPI, + + /* Touchscreens */ + LITEST_CALIBRATED_TOUCHSCREEN, LITEST_GENERIC_MULTITOUCH_SCREEN, + LITEST_GENERIC_SINGLETOUCH, + LITEST_MS_SURFACE_COVER, + LITEST_MULTITOUCH_FUZZ_SCREEN, LITEST_NEXUS4_TOUCH_SCREEN, - LITEST_MAGIC_TRACKPAD, - LITEST_ELANTECH_TOUCHPAD, - LITEST_MOUSE_GLADIUS, - LITEST_MOUSE_WHEEL_CLICK_ANGLE, - LITEST_APPLE_KEYBOARD, + LITEST_PROTOCOL_A_SCREEN, + LITEST_TOUCHSCREEN_INVALID_RANGE, + LITEST_TOUCHSCREEN_MT_TOOL_TYPE, + LITEST_WACOM_TOUCH, + + /* Pointing devices and keyboards */ + LITEST_MOUSE, + LITEST_KEYBOARD, + LITEST_TRACKPOINT, + LITEST_ABSINFO_OVERRIDE, + LITEST_ACER_HAWAII_KEYBOARD, LITEST_ANKER_MOUSE_KBD, - LITEST_WACOM_BAMBOO, - LITEST_WACOM_CINTIQ, - LITEST_WACOM_INTUOS, - LITEST_WACOM_ISDV4, - LITEST_WALTOP, - LITEST_HUION_TABLET, + LITEST_APPLE_KEYBOARD, LITEST_CYBORG_RAT, - LITEST_YUBIKEY, - LITEST_SYNAPTICS_I2C, - LITEST_WACOM_CINTIQ_24HD, - LITEST_MULTITOUCH_FUZZ_SCREEN, - LITEST_WACOM_INTUOS3_PAD, - LITEST_WACOM_INTUOS5_PAD, + LITEST_HP_WMI_HOTKEYS, + LITEST_IGNORED_MOUSE, LITEST_KEYBOARD_ALL_CODES, + LITEST_KEYBOARD_BLACKWIDOW, + LITEST_KEYBOARD_BLADE_STEALTH, + LITEST_KEYBOARD_BLADE_STEALTH_VIDEOSWITCH, + LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE, + LITEST_KEYBOARD_QUIRKED, + LITEST_LENOVO_SCROLLPOINT, + LITEST_LOGITECH_TRACKBALL, LITEST_MAGICMOUSE, - LITEST_WACOM_EKR, - LITEST_WACOM_CINTIQ_24HDT_PAD, - LITEST_WACOM_CINTIQ_13HDT_PEN, - LITEST_WACOM_CINTIQ_13HDT_PAD, - LITEST_WACOM_CINTIQ_13HDT_FINGER, - LITEST_WACOM_CINTIQ_PRO16_PAD, - LITEST_WACOM_CINTIQ_PRO16_PEN, - LITEST_WACOM_CINTIQ_PRO16_FINGER, - LITEST_WACOM_HID4800_PEN, + LITEST_MOUSE_FORMAT_STRING, + LITEST_MOUSE_GLADIUS, + LITEST_MOUSE_LOW_DPI, + LITEST_MOUSE_ROCCAT, + LITEST_MOUSE_WHEEL_CLICK_ANGLE, LITEST_MOUSE_WHEEL_CLICK_COUNT, - LITEST_CALIBRATED_TOUCHSCREEN, - LITEST_ACER_HAWAII_KEYBOARD, - LITEST_ACER_HAWAII_TOUCHPAD, - LITEST_SYNAPTICS_RMI4, LITEST_MOUSE_WHEEL_TILT, + LITEST_MS_NANO_TRANSCEIVER_MOUSE, + LITEST_SONY_VAIO_KEYS, + LITEST_SYNAPTICS_TRACKPOINT_BUTTONS, + LITEST_THINKPAD_EXTRABUTTONS, + LITEST_VMWARE_VIRTMOUSE, + LITEST_WHEEL_ONLY, + LITEST_XEN_VIRTUAL_POINTER, + + /* Switches */ LITEST_LID_SWITCH, LITEST_LID_SWITCH_SURFACE3, - LITEST_APPLETOUCH, + LITEST_TABLET_MODE_UNRELIABLE, + + /* Special devices */ + LITEST_DELL_CANVAS_TOTEM, + LITEST_DELL_CANVAS_TOTEM_TOUCH, LITEST_GPIO_KEYS, - LITEST_IGNORED_MOUSE, - LITEST_WACOM_MOBILESTUDIO_PRO_16_PAD, - LITEST_THINKPAD_EXTRABUTTONS, + LITEST_YUBIKEY, + + /* Tablets */ + LITEST_ELAN_TABLET, + LITEST_HUION_TABLET, + LITEST_QEMU_TABLET, LITEST_UCLOGIC_TABLET, - LITEST_KEYBOARD_BLADE_STEALTH, - LITEST_KEYBOARD_BLADE_STEALTH_VIDEOSWITCH, + LITEST_WACOM_BAMBOO, + LITEST_WACOM_BAMBOO_2FG_FINGER, LITEST_WACOM_BAMBOO_2FG_PAD, LITEST_WACOM_BAMBOO_2FG_PEN, - LITEST_WACOM_BAMBOO_2FG_FINGER, - LITEST_HP_WMI_HOTKEYS, - LITEST_MS_NANO_TRANSCEIVER_MOUSE, - LITEST_AIPTEK, - LITEST_TOUCHSCREEN_INVALID_RANGE, - LITEST_TOUCHSCREEN_MT_TOOL_TYPE, - LITEST_DELL_CANVAS_TOTEM, - LITEST_DELL_CANVAS_TOTEM_TOUCH, + LITEST_WACOM_CALIBRATED_TABLET, + LITEST_WACOM_CINTIQ, + LITEST_WACOM_CINTIQ_13HDT_FINGER, + LITEST_WACOM_CINTIQ_13HDT_PAD, + LITEST_WACOM_CINTIQ_13HDT_PEN, + LITEST_WACOM_CINTIQ_24HD, + LITEST_WACOM_CINTIQ_24HDT_PAD, + LITEST_WACOM_CINTIQ_PRO16_FINGER, + LITEST_WACOM_CINTIQ_PRO16_PAD, + LITEST_WACOM_CINTIQ_PRO16_PEN, + LITEST_WACOM_EKR, + LITEST_WACOM_HID4800_PEN, + LITEST_WACOM_INTUOS, + LITEST_WACOM_INTUOS3_PAD, + LITEST_WACOM_INTUOS5_PAD, + LITEST_WACOM_ISDV4, LITEST_WACOM_ISDV4_4200_PEN, - LITEST_ALPS_3FG, - LITEST_ELAN_TABLET, - LITEST_ABSINFO_OVERRIDE, - LITEST_TABLET_MODE_UNRELIABLE, - LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE, - LITEST_SONY_VAIO_KEYS, - LITEST_KEYBOARD_QUIRKED, - LITEST_SYNAPTICS_PRESSUREPAD, - LITEST_GENERIC_PRESSUREPAD, LITEST_WACOM_ISDV4_524C_PEN, - LITEST_MOUSE_FORMAT_STRING, - LITEST_LENOVO_SCROLLPOINT, - LITEST_SYNAPTICS_PHANTOMCLICKS, - LITEST_WACOM_CALIBRATED_TABLET, + LITEST_WACOM_MOBILESTUDIO_PRO_16_PAD, + LITEST_WALTOP, }; #define LITEST_DEVICELESS -2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/test/test-pad.c new/libinput-1.25.0/test/test-pad.c --- old/libinput-1.24.0/test/test-pad.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/test/test-pad.c 2024-01-15 09:53:20.000000000 +0100 @@ -618,13 +618,19 @@ struct libinput_device *device = dev->libinput_device; enum libinput_config_status status; + /* Without libwacom we default to left-handed being available */ +#if HAVE_LIBWACOM ck_assert(!libinput_device_config_left_handed_is_available(device)); +#else + ck_assert(libinput_device_config_left_handed_is_available(device)); +#endif ck_assert_int_eq(libinput_device_config_left_handed_get_default(device), 0); ck_assert_int_eq(libinput_device_config_left_handed_get(device), 0); +#if HAVE_LIBWACOM status = libinput_device_config_left_handed_set(dev->libinput_device, 1); ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_UNSUPPORTED); @@ -640,6 +646,7 @@ 0); ck_assert_int_eq(libinput_device_config_left_handed_get_default(device), 0); +#endif } END_TEST diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/test/test-tablet.c new/libinput-1.25.0/test/test-tablet.c --- old/libinput-1.24.0/test/test-tablet.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/test/test-tablet.c 2024-01-15 09:53:20.000000000 +0100 @@ -35,6 +35,7 @@ #include "libinput-util.h" #include "evdev-tablet.h" #include "litest.h" +#include "util-input-event.h" static inline unsigned int pick_stylus_or_btn0(struct litest_device *dev) @@ -1942,7 +1943,12 @@ { struct litest_device *dev = litest_current_device(); + /* Without libwacom we default to left-handed being available */ +#if HAVE_LIBWACOM ck_assert(!libinput_device_config_left_handed_is_available(dev->libinput_device)); +#else + ck_assert(libinput_device_config_left_handed_is_available(dev->libinput_device)); +#endif } END_TEST @@ -1998,11 +2004,11 @@ abs = libevdev_get_abs_info(dev->evdev, ABS_TILT_X); ck_assert_notnull(abs); - tilt_center_x = (abs->maximum - abs->minimum + 1) / 2; + tilt_center_x = absinfo_range(abs) / 2; abs = libevdev_get_abs_info(dev->evdev, ABS_TILT_Y); ck_assert_notnull(abs); - tilt_center_y = (abs->maximum - abs->minimum + 1) / 2; + tilt_center_y = absinfo_range(abs) / 2; x = cos(a) * 20 + tilt_center_x; y = sin(a) * 20 + tilt_center_y; @@ -2098,7 +2104,7 @@ abs = libevdev_get_abs_info(dev->evdev, ABS_Z); ck_assert_notnull(abs); - scale = (abs->maximum - abs->minimum + 1)/360.0; + scale = absinfo_range(abs)/360.0; litest_event(dev, EV_KEY, BTN_TOOL_BRUSH, 1); litest_event(dev, EV_ABS, ABS_MISC, 0x804); /* Art Pen */ @@ -3343,9 +3349,9 @@ for (i = 2; i < 5; i++) { /* send x/y events to make sure we reset the wheel */ abs = libevdev_get_abs_info(dev->evdev, ABS_X); - litest_event(dev, EV_ABS, ABS_X, (abs->maximum - abs->minimum)/i); + litest_event(dev, EV_ABS, ABS_X, absinfo_range(abs)/i); abs = libevdev_get_abs_info(dev->evdev, ABS_Y); - litest_event(dev, EV_ABS, ABS_Y, (abs->maximum - abs->minimum)/i); + litest_event(dev, EV_ABS, ABS_Y, absinfo_range(abs)/i); litest_event(dev, EV_SYN, SYN_REPORT, 0); libinput_dispatch(li); @@ -3436,7 +3442,7 @@ litest_drain_events(li); - scale = abs->maximum - abs->minimum; + scale = absinfo_range(abs); for (v = abs->minimum; v < abs->maximum; v += 8) { litest_event(dev, EV_ABS, ABS_WHEEL, v); litest_event(dev, EV_SYN, SYN_REPORT, 0); @@ -3510,7 +3516,7 @@ abs = libevdev_get_abs_info(dev->evdev, ABS_Z); ck_assert_notnull(abs); - scale = (abs->maximum - abs->minimum + 1)/360.0; + scale = absinfo_range(abs)/360.0; litest_event(dev, EV_KEY, BTN_TOOL_BRUSH, 1); litest_event(dev, EV_ABS, ABS_MISC, 0x804); /* Art Pen */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/test/test-totem.c new/libinput-1.25.0/test/test-totem.c --- old/libinput-1.24.0/test/test-totem.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/test/test-totem.c 2024-01-15 09:53:20.000000000 +0100 @@ -34,6 +34,7 @@ #include "libinput-util.h" #include "evdev-tablet.h" #include "litest.h" +#include "util-input-event.h" START_TEST(totem_type) { @@ -143,9 +144,9 @@ const struct input_absinfo *abs; abs = libevdev_get_abs_info(dev->evdev, ABS_MT_POSITION_X); - w = (abs->maximum - abs->minimum + 1)/abs->resolution; + w = absinfo_range(abs)/abs->resolution; abs = libevdev_get_abs_info(dev->evdev, ABS_MT_POSITION_Y); - h = (abs->maximum - abs->minimum + 1)/abs->resolution; + h = absinfo_range(abs)/abs->resolution; litest_tablet_proximity_in(dev, 50, 50, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/test/test-touchpad.c new/libinput-1.25.0/test/test-touchpad.c --- old/libinput-1.24.0/test/test-touchpad.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/test/test-touchpad.c 2024-01-15 09:53:20.000000000 +0100 @@ -2194,6 +2194,28 @@ } END_TEST +START_TEST(touchpad_palm_ignore_threshold_zero) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + struct axis_replacement axes[] = { + { ABS_MT_PRESSURE, 75 }, + { -1, 0 } + }; + + litest_disable_tap(dev->libinput_device); + litest_disable_hold_gestures(dev->libinput_device); + litest_drain_events(li); + + litest_touch_down_extended(dev, 0, 50, 99, axes); + litest_touch_move_to(dev, 0, 50, 50, 80, 99, 10); + litest_touch_up(dev, 0); + + libinput_dispatch(li); + litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); +} +END_TEST + START_TEST(touchpad_palm_clickfinger_pressure) { struct litest_device *dev = litest_current_device(); @@ -7292,6 +7314,8 @@ litest_add(touchpad_palm_detect_pressure_keep_palm, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add(touchpad_palm_detect_pressure_after_edge, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); litest_add(touchpad_palm_detect_pressure_after_dwt, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH); + litest_add_for_device(touchpad_palm_ignore_threshold_zero, LITEST_TOUCHPAD_PALMPRESSURE_ZERO); + litest_add(touchpad_palm_clickfinger_pressure, LITEST_CLICKPAD, LITEST_ANY); litest_add(touchpad_palm_clickfinger_pressure_2fg, LITEST_CLICKPAD, LITEST_ANY); litest_add(touchpad_palm_clickfinger_size, LITEST_CLICKPAD, LITEST_ANY); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/tools/libinput-debug-gui.c new/libinput-1.25.0/tools/libinput-debug-gui.c --- old/libinput-1.24.0/tools/libinput-debug-gui.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/tools/libinput-debug-gui.c 2024-01-15 09:53:20.000000000 +0100 @@ -448,7 +448,6 @@ int x, y; cairo_save(cr); - cairo_set_source_rgb(cr, .2, .2, .8); center_x = w->width/2 + 400; center_y = w->height/2; @@ -495,6 +494,7 @@ if (!w->evdev.slots[i].active) continue; + cairo_set_source_rgb(cr, .2, .2, .8); x = w->evdev.slots[i].x; y = w->evdev.slots[i].y; x = 1.0 * (x - ax->minimum)/width * outline_width; @@ -503,10 +503,21 @@ y += center_y - outline_height/2; cairo_arc(cr, x, y, 10, 0, 2 * M_PI); cairo_fill(cr); + + char finger_text[3]; + cairo_text_extents_t finger_text_extents; + snprintf(finger_text, 3, "%zu", i); + cairo_set_source_rgb(cr, 1.f, 1.f, 1.f); + cairo_set_font_size(cr, 12.0); + cairo_text_extents(cr, finger_text, &finger_text_extents); + cairo_move_to(cr, x - finger_text_extents.width/2, + y + finger_text_extents.height/2); + cairo_show_text(cr, finger_text); } draw_outline: /* The touchpad outline */ + cairo_set_source_rgb(cr, .2, .2, .8); cairo_rectangle(cr, center_x - outline_width/2, center_y - outline_height/2, @@ -970,6 +981,7 @@ { struct window *w = data; + cairo_set_font_size(cr, 12.0); cairo_set_source_rgb(cr, 1, 1, 1); cairo_rectangle(cr, 0, 0, w->width, w->height); cairo_fill(cr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/tools/libinput-debug-tablet.c new/libinput-1.25.0/tools/libinput-debug-tablet.c --- old/libinput-1.24.0/tools/libinput-debug-tablet.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/tools/libinput-debug-tablet.c 2024-01-15 09:53:20.000000000 +0100 @@ -39,6 +39,7 @@ #include "shared.h" #include "util-macros.h" +#include "util-input-event.h" static volatile sig_atomic_t stop = 0; static struct tools_options options; @@ -149,7 +150,7 @@ if (!abs) return 0.0; - return 1.0 * (value - abs->minimum)/(abs->maximum - abs->minimum + 1); + return 1.0 * (value - abs->minimum)/absinfo_range(abs); } static int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.24.0/tools/libinput-record.c new/libinput-1.25.0/tools/libinput-record.c --- old/libinput-1.24.0/tools/libinput-record.c 2023-08-25 05:04:17.000000000 +0200 +++ new/libinput-1.25.0/tools/libinput-record.c 2024-01-15 09:53:20.000000000 +0100 @@ -1486,12 +1486,37 @@ print_description(FILE *fp, struct libevdev *dev) { const struct input_absinfo *x, *y; + int bustype; + const char *busname; + + bustype = libevdev_get_id_bustype(dev); + switch (bustype) { + case BUS_USB: + busname = " (usb) "; + break; + case BUS_BLUETOOTH: + busname = " (bluetooth) "; + break; + case BUS_I2C: + busname = " (i2c) "; + break; + case BUS_SPI: + busname = " (spi) "; + break; + case BUS_RMI: + busname = " (rmi) "; + break; + default: + busname = " "; + break; + } iprintf(fp, I_EVDEV, "# Name: %s\n", libevdev_get_name(dev)); iprintf(fp, I_EVDEV, - "# ID: bus %#02x vendor %#02x product %#02x version %#02x\n", - libevdev_get_id_bustype(dev), + "# ID: bus 0x%04x%svendor 0x%04x product 0x%04x version 0x%04x\n", + bustype, + busname, libevdev_get_id_vendor(dev), libevdev_get_id_product(dev), libevdev_get_id_version(dev)); @@ -2577,7 +2602,7 @@ enum fposition { ERROR, - NOFILE, + NO_FILE, FIRST, LAST, }; @@ -2633,7 +2658,7 @@ return ERROR; } #undef _m - return NOFILE; + return NO_FILE; } enum options {