libinput/src
Peter Hutterer 827dff0be2 plugin: ensure prox out for a forced proximity tool if the tool changes
A device may send axis events while the tool is out of proximity,
causing our plugin to force a proximity in for the pen. If the tool then
sends a proximity event for a different tool we ended up with two tools
in proximity.

The sequence in #1171 shows this:

  - evdev:
    - [  1, 499608,   3,  27,       0] # EV_ABS / ABS_TILT_Y                0 (+30)
    - [  1, 499608,   0,   0,       0] # ------------ SYN_REPORT (0) ---------- +0ms
  - evdev:
    - [  2, 199637,   1, 321,       1] # EV_KEY / BTN_TOOL_RUBBER           1
    - [  2, 199637,   4,   4,      30] # EV_MSC / MSC_SCAN                 30 (obfuscated)
    - [  2, 199637,   1, 330,       1] # EV_KEY / BTN_TOUCH                 1
    - [  2, 199637,   3,   0,     910] # EV_ABS / ABS_X                   910 (+246)
    - [  2, 199637,   3,   1,    8736] # EV_ABS / ABS_Y                  8736 (-105)
    - [  2, 199637,   3,  27,     -25] # EV_ABS / ABS_TILT_Y              -25 (-25)
    - [  2, 199637,   0,   0,       0] # ------------ SYN_REPORT (0) ---------- +700ms

Fix this by remembering that we forced the tool out of proximity so if
we see tool events for another tool we force the pen out of proximity
again.

This will have some interplay with the other tablet plugins but
hopefully none that affect real-world devices, e.g. forcing a proximity
out means the proximity out timer plugin gets disabled. Since devices
behave in unexpected manners anyway let's see if it affects a real-world
device.

Closes #1171

(cherry picked from commit f3f8e8ef6c)

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1326>
2025-10-15 08:46:50 +10:00
..
builddir.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
evdev-fallback.c Move mtdev into a plugin 2025-07-02 06:53:05 +00:00
evdev-fallback.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
evdev-frame.h evdev: remove duplicate sizeof 2025-08-26 12:33:57 +10:00
evdev-middle-button.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
evdev-mt-touchpad-buttons.c Switch our internal dispatch interface to take an evdev frame 2025-07-02 06:53:05 +00:00
evdev-mt-touchpad-edge-scroll.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
evdev-mt-touchpad-gestures.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
evdev-mt-touchpad-tap.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
evdev-mt-touchpad-thumb.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
evdev-mt-touchpad.c evdev: move the SYN_REPORT 1 filtering to the touchpad backend 2025-07-31 00:50:30 +00:00
evdev-mt-touchpad.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
evdev-plugin.c plugin/evdev: drop the duplicate event frame printing 2025-07-21 11:53:57 +10:00
evdev-plugin.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
evdev-tablet-pad-leds.c meson.build: change from config.set10() and #if to config.set() and #ifdef 2025-07-28 12:04:09 +10:00
evdev-tablet-pad.c pad: don't assert when unable to find the mode group, just discard 2025-08-26 12:34:00 +10:00
evdev-tablet-pad.h pad: don't assert when unable to find the mode group, just discard 2025-08-26 12:34:00 +10:00
evdev-tablet.c meson.build: change from config.set10() and #if to config.set() and #ifdef 2025-07-28 12:04:09 +10:00
evdev-tablet.h meson.build: change from config.set10() and #if to config.set() and #ifdef 2025-07-28 12:04:09 +10:00
evdev-totem.c Switch our internal dispatch interface to take an evdev frame 2025-07-02 06:53:05 +00:00
evdev.c evdev: move the SYN_REPORT 1 filtering to the touchpad backend 2025-07-31 00:50:30 +00:00
evdev.h Make the model quirk check available on the libinput device 2025-07-10 01:33:23 +00:00
filter-custom.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-flat.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-low-dpi.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-mouse.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-private.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-tablet.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-touchpad-flat.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-touchpad-x230.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-touchpad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-trackpoint-flat.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter-trackpoint.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
filter.h Run clang-format over the code 2025-07-01 16:42:44 +10: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-log.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-plugin-button-debounce.c plugin: don't initialize the debounce plugin on a virtual device 2025-10-15 08:46:19 +10:00
libinput-plugin-button-debounce.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-plugin-mouse-wheel-lowres.c plugin: ignore high-resolution wheel events from disabled wheels 2025-07-24 09:13:12 +10:00
libinput-plugin-mouse-wheel-lowres.h plugins: add a plugin to emulate high-resolution wheel events 2025-07-14 11:14:15 +10:00
libinput-plugin-mouse-wheel.c plugin/wheel: reduce ACC_V120_THRESHOLD 2025-07-12 10:28:17 +03:00
libinput-plugin-mouse-wheel.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-plugin-mtdev.c Move mtdev into a plugin 2025-07-02 06:53:05 +00:00
libinput-plugin-mtdev.h Move mtdev into a plugin 2025-07-02 06:53:05 +00:00
libinput-plugin-private.h plugin: remove a leftover function 2025-07-15 10:51:42 +10:00
libinput-plugin-system.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-plugin-tablet-double-tool.c plugin: prevent potential keycode leakage to the logs 2025-07-21 13:02:20 +10:00
libinput-plugin-tablet-double-tool.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-plugin-tablet-eraser-button.c Add evdev_frame_append_one() 2025-07-02 06:53:05 +00:00
libinput-plugin-tablet-eraser-button.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-plugin-tablet-forced-tool.c plugin: ensure prox out for a forced proximity tool if the tool changes 2025-10-15 08:46:50 +10:00
libinput-plugin-tablet-forced-tool.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-plugin-tablet-proximity-timer.c plugin: remove the proximity timer callback after prox out events 2025-10-15 08:46:48 +10:00
libinput-plugin-tablet-proximity-timer.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-plugin.c plugin: expand the plugin name prefix to 22 chars 2025-08-26 12:34:57 +10:00
libinput-plugin.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-private-config.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput-private-config.h gesutures: allow to configure hold gestures 2021-06-09 01:18:58 +00:00
libinput-private.h plugin: don't initialize the debounce plugin on a virtual device 2025-10-15 08:46:19 +10:00
libinput-restore-selinux-context.sh meson: Fix absolute libdir case in install script 2018-02-16 16:57:30 +10:00
libinput-util.h Run clang-format over the code 2025-07-01 16:42:44 +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 Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput.c plugin: don't initialize the debounce plugin on a virtual device 2025-10-15 08:46:19 +10:00
libinput.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
libinput.sym Add an API for configurable eraser button behavior 2025-06-18 19:38:14 +10:00
path-seat.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
quirks.c plugins: restore the wheel plugin specifically for the MX Master 3 2025-07-10 01:33:24 +00:00
quirks.h plugins: restore the wheel plugin specifically for the MX Master 3 2025-07-10 01:33:24 +00:00
timer.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
timer.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
udev-seat.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
udev-seat.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-backtrace.h meson.build: change from config.set10() and #if to config.set() and #ifdef 2025-07-28 12:04:09 +10:00
util-bits.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-files.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-files.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-input-event.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-libinput.c util: print nonchanged axis with a space instead of a * 2025-08-26 12:35:06 +10:00
util-libinput.h Move the event printing out into a utility 2025-03-13 06:13:38 +00:00
util-list.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-list.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-macros.h util: add a clamp macro 2025-07-28 23:40:33 +00:00
util-matrix.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-mem.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-multivalue.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-newtype.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-prop-parsers.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-prop-parsers.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-range.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-ratelimit.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-ratelimit.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-stringbuf.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-strings.c utils: allow strv_join on a null string 2025-07-28 23:40:32 +00:00
util-strings.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-time.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
util-udev.h Run clang-format over the code 2025-07-01 16:42:44 +10:00