libinput/src
Peter Hutterer e9f3fc080c tablet: revamp the tablet pressure range handling
Commit 48cd4c7287 ("tablet: track pressure ranges per tablet") added
tracking of pressure ranges per tablet by storing ranges for multiple
(up to 4) tablets in the tool. This doesn't scale well, had the
disadvantage of the range only being updated on out-of-proximity, and is
the wrong approach anyway.

Turns out we can update the pressure range on proximity in since we
haven't processed the pressure values yet at that stage. This gives us
better behavior when switching between tablet devices (including unplug)
as the pen will only lag behind once (when setting the range) instead
of once per new tablet.

However, since the offset (which is a tool issue) applies on top of the
pressure range (which is a tablet property) this requires that we now
track the offset as percent of the range.

So on proximity in we apply the new tablet range, then apply the e.g. 5%
pressure offset within this range.

This means we no longer have to track multiple tablets since it'll just
apply on the current tablet when in proximity.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1172>
2025-04-04 22:44:29 +00:00
..
builddir.h util: change the builddir_lookup() to return a boolean 2025-04-04 15:47:23 +00: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 pad: fix handling of direct mode switch buttons 2025-03-27 04:57:33 +00: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: revamp the tablet pressure range handling 2025-04-04 22:44:29 +00:00
evdev-tablet.h tablet: track pressure ranges per tablet 2025-02-25 05:18:58 +00:00
evdev-totem.c tablet: revamp the tablet pressure range handling 2025-04-04 22:44:29 +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 Add a few 0 enum values to shut up clang-tidy 2025-04-04 15:47:23 +00:00
evdev.h Add a few 0 enum values to shut up clang-tidy 2025-04-04 15:47:23 +00: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: revamp the tablet pressure range handling 2025-04-04 22:44:29 +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: provide better alignment for the function name/line no in trace 2025-03-25 15:05:45 +10: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 meson: add option for internal event debugging 2025-03-13 06:13:38 +00:00
libinput.h doc: fix two duplicated references 2025-03-12 11:43:25 +10: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 Add a few 0 enum values to shut up clang-tidy 2025-04-04 15:47:23 +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 Add a few missing includes for config.h 2025-04-04 15:47:23 +00: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: add extra highlighting for the backtrace 2025-03-14 09:52:30 +10:00
util-bits.h Remove duplicate empty lines in our source 2022-11-25 10:08:20 +10:00
util-files.h util: fix a memleak in mkdir_p 2025-04-04 15:47:23 +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-libinput.c tools/debug-events: print pinch angle and rotation again 2025-04-01 02:25:08 +00:00
util-libinput.h Move the event printing out into a utility 2025-03-13 06:13:38 +00: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 Add a few missing includes for config.h 2025-04-04 15:47:23 +00:00
util-newtype.h util: add a newtype macro 2025-04-04 11:05:20 +00: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 some extra strv helpers 2025-04-04 22:19:47 +00:00
util-strings.h util: add some extra strv helpers 2025-04-04 22:19:47 +00:00
util-time.h util: add a bunch more time conversions 2024-10-30 23:20:42 +00:00