libinput/src
Peter Hutterer 48cd4c7287 tablet: track pressure ranges per tablet
Tablets may have different ABS_PRESSURE ranges with the oldest tablets
having 1k pressure range, then 2k, and the newer ones 8k.

If the same tool is used across two tablets with different ABS_PRESSURE
ranges, the first tablet in proximity calculated the range on where to
normalize to. As a result the other tablet either couldn't reach the
full pressure (2k pressure first, then 8k) or the full pressure range
was reached at a fraction of the full range (8k pressure first, then
2k).

Fix this by moving the threshold handling into a separate struct and
hardcoding up to 4 of those per tool. That is 2 more than the more
complicated setups I've heard of (and this only applies to tracking the
same stylus across those tablets anyway).

This duplicates the pressure offset heuristics but that's easier than
figuring out how to handle heuristics across potentially two tablets.

The range configuration is left as-is on the assumption that this one is
per tool, not per tablet.

Closes #1089

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1143>
2025-02-25 05:18:58 +00:00
..
builddir.h Fix a few coverity complaints 2020-11-10 14:27:22 +10:00
evdev-debounce.c evdev: restart debouncing timers after every event 2021-05-19 12:24:59 +02:00
evdev-fallback.c sparse: make some variables static 2024-03-18 23:35:34 +00:00
evdev-fallback.h fallback: remove write-only rotation.is_enabled variable 2023-04-27 13:15:14 +10:00
evdev-middle-button.c Use bit(foo) instead of (1 << foo) 2021-11-18 10:11:43 +10:00
evdev-mt-touchpad-buttons.c fix: unnecessary braces and mistake in doc 2024-04-09 23:40:34 -03:00
evdev-mt-touchpad-edge-scroll.c High-resolution scroll wheel support 2021-08-31 08:45:01 +02:00
evdev-mt-touchpad-gestures.c gestures: if 3fg drag fingers are in a nice position, start dragging 2025-02-18 06:44:01 +00:00
evdev-mt-touchpad-tap.c touchpad: cancel any ongoing gesture if we're about to send a button 2025-02-18 06:44:01 +00:00
evdev-mt-touchpad-thumb.c touchpad: init the thumb size threshold to INT_MAX 2024-12-18 08:24:41 +00:00
evdev-mt-touchpad.c touchpad: implement support for three-finger drag 2025-02-18 06:44:01 +00:00
evdev-mt-touchpad.h touchpad: implement support for three-finger drag 2025-02-18 06:44:01 +00:00
evdev-tablet-pad-leds.c tablet: centralize the libwacom handling 2024-10-31 13:38:28 +10:00
evdev-tablet-pad.c pad: be more robust to kernel bugs of multiple EV_ABS 2025-02-12 03:58:23 +00:00
evdev-tablet-pad.h pad: be more robust to kernel bugs of multiple EV_ABS 2025-02-12 03:58:23 +00:00
evdev-tablet.c tablet: track pressure ranges per tablet 2025-02-25 05:18:58 +00:00
evdev-tablet.h tablet: track pressure ranges per tablet 2025-02-25 05:18:58 +00:00
evdev-totem.c tablet: track pressure ranges per tablet 2025-02-25 05:18:58 +00:00
evdev-wheel.c evdev: if a device's rotation is around 180 degrees, flip the wheel 2023-04-27 13:15:14 +10:00
evdev.c evdev: print the EV_SYN with better alignment to other messages 2025-01-07 13:04:30 +10:00
evdev.h Move evdev_convert_to_mm to a more generic helper 2024-11-05 12:05:05 +10:00
filter-custom.c sparse: make some variables static 2024-03-18 23:35:34 +00:00
filter-flat.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter-low-dpi.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter-mouse.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter-private.h filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter-tablet.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter-touchpad-flat.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter-touchpad-x230.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter-touchpad.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter-trackpoint-flat.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter-trackpoint.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter.c filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
filter.h filter: add scroll movement type to the custom acceleration profile 2023-02-24 13:01:34 +02:00
libinput-git-version.h.in tools: add the git version in the libinput-record output 2018-03-06 14:22:30 +10:00
libinput-private-config.c gesutures: allow to configure hold gestures 2021-06-09 01:18:58 +00:00
libinput-private-config.h gesutures: allow to configure hold gestures 2021-06-09 01:18:58 +00:00
libinput-private.h tablet: track pressure ranges per tablet 2025-02-25 05:18:58 +00:00
libinput-restore-selinux-context.sh meson: Fix absolute libdir case in install script 2018-02-16 16:57:30 +10:00
libinput-uninstalled.pc.in buildsystem: add missing uninstalled pkg-config infra 2016-08-30 17:18:39 +10:00
libinput-util.h util: Add a multivalue special type 2025-01-07 02:02:37 +00:00
libinput-version.h.in COPYING: Update boilerplate from MIT X11 to MIT Expat license 2015-06-16 14:36:04 +10:00
libinput-versionsort.h Define the versionsort overrides as inlines 2021-07-28 12:50:11 +10:00
libinput.c touchpad: implement support for three-finger drag 2025-02-18 06:44:01 +00:00
libinput.h touchpad: implement support for three-finger drag 2025-02-18 06:44:01 +00:00
libinput.pc.in Add -lrt to the libs 2014-07-03 09:59:43 +10:00
libinput.sym touchpad: implement support for three-finger drag 2025-02-18 06:44:01 +00:00
path-seat.c Remove duplicate empty lines in our source 2022-11-25 10:08:20 +10:00
quirks.c Replace strneq() with hardcoded lengths with strstartswith() 2025-01-20 10:29:47 +00:00
quirks.h Disregard touchless clicks on flaky devices 2023-04-11 02:00:52 +00:00
timer.c timer: only warn about timer expiry issues when we're more than 20ms behind 2021-12-07 11:54:08 +10:00
timer.h Use bit(foo) instead of (1 << foo) 2021-11-18 10:11:43 +10:00
udev-seat.c Replace strneq() with hardcoded lengths with strstartswith() 2025-01-20 10:29:47 +00:00
udev-seat.h COPYING: Update boilerplate from MIT X11 to MIT Expat license 2015-06-16 14:36:04 +10:00
util-backtrace.h test: highlight the interesting part of the backtrace 2025-01-20 11:30:01 +00:00
util-bits.h Remove duplicate empty lines in our source 2022-11-25 10:08:20 +10:00
util-files.h Fix two scan-build warnings that appear on F41 2024-12-23 07:17:31 +00:00
util-input-event.h Move evdev_convert_to_mm to a more generic helper 2024-11-05 12:05:05 +10:00
util-list.c util: add a LIST_INIT macro 2024-03-18 16:25:47 +00:00
util-list.h util: add a LIST_INIT macro 2024-03-18 16:25:47 +00:00
util-macros.h test: make the TEST_COLLECTION() macro re-usable in the same file 2024-10-18 10:49:47 +10:00
util-matrix.h util: make a float to int conversion explicit 2024-10-29 10:18:54 +10:00
util-multivalue.h test: add optional value names to parametrized tests 2025-02-20 08:18:48 +01:00
util-prop-parsers.c Replace strneq() with hardcoded lengths with strstartswith() 2025-01-20 10:29:47 +00:00
util-prop-parsers.h quirks: allow overriding of AttrEventCode and AttrInputProp 2022-11-28 08:25:41 +10:00
util-range.h util: add the range handling as separate header file 2024-10-30 23:20:42 +00:00
util-ratelimit.c [clang-tidy] do not use else after return 2020-08-27 01:17:24 -07:00
util-ratelimit.h [clang-tidy] fix inconsistent declarations 2020-08-27 01:00:31 -07:00
util-stringbuf.h util: add a generic stringbuffer with a few helper functions 2024-10-30 23:20:42 +00:00
util-strings.c util: add a strv_for_each helper function 2024-09-05 13:54:07 +00:00
util-strings.h util: add truefalse and yesno macros for easy string conversion 2025-01-20 09:54:32 +00:00
util-time.h util: add a bunch more time conversions 2024-10-30 23:20:42 +00:00