libinput/test
Peter Hutterer f3f8e8ef6c 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

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1306>
2025-08-31 00:18:59 +00:00
..
.clang-tidy Add a clang-tidy file 2025-04-07 08:43:36 +00:00
50-litest.conf test: rename the identifier in the 50-litest.conf 2020-07-15 09:36:48 +10:00
build-cxx.cc meson.build: drop the separate cpp flags 2020-09-09 13:57:39 +10:00
build-pedantic.c Fix a couple of coding style issues 2015-05-01 12:09:57 +10:00
check-leftover-udev-rules.sh test: add a script to check for leftover litest rules 2018-03-23 12:41:23 +10:00
generate-gcov-report.sh Hook up gcov for coverage reports 2017-01-20 10:35:37 +10:00
helper-copy-and-exec-from-tmp.sh tools: move the builddir lookup function out to a separate file 2019-03-14 11:28:05 +10:00
libinput-test-suite.man test: rename the identifier in the 50-litest.conf 2020-07-15 09:36:48 +10:00
litest-device-absinfo-override.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-acer-hawaii-keyboard.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-acer-hawaii-touchpad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-aiptek-tablet.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-alps-3fg.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-alps-dualpoint.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-alps-semi-mt.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-anker-mouse-kbd.c test: update a test for current kernels 2025-07-01 09:20:57 +00:00
litest-device-apple-appletouch.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-apple-internal-keyboard.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-apple-magicmouse.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-asus-rog-gladius.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-atmel-hover.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-bcm5974.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-calibrated-touchscreen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-cyborg-rat-5.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-dell-canvas-totem-touch.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-dell-canvas-totem.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-elan-tablet.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-elantech-touchpad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-format-string.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-generic-pressurepad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-generic-singletouch.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-gpio-keys.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-hp-wmi-hotkeys.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-huion-pentablet.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-huion-q620m-dial.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-ignored-mouse.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-keyboard-all-codes.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-keyboard-quirked.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-keyboard-razer-blackwidow.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-keyboard-razer-blade-stealth-videoswitch.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-keyboard-razer-blade-stealth.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-keyboard.c evdev: move the SYN_REPORT 1 filtering to the touchpad backend 2025-07-31 00:50:30 +00:00
litest-device-lenovo-scrollpoint.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-lid-switch-surface3.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-lid-switch.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-logitech-media-keyboard-elite.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-logitech-trackball.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-magic-trackpad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-mouse-low-dpi.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-mouse-ps2.c test: add a typical PS/2 wheel mouse 2025-07-17 00:36:52 +00:00
litest-device-mouse-roccat.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-mouse-virtual.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-mouse-wheel-click-angle.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-mouse-wheel-click-count.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-mouse-wheel-hires-disabled.c plugin: ignore high-resolution wheel events from disabled wheels 2025-07-24 09:13:12 +10:00
litest-device-mouse-wheel-tilt.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-mouse.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-ms-nano-transceiver-mouse.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-ms-surface-cover.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-nexus4-touch-screen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-ploopy-pavonis-stylus.c test: add a test device for a pressureless tablet 2025-07-09 21:21:32 +00:00
litest-device-protocol-a-touch-screen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-qemu-usb-tablet.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-sony-vaio-keys.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-synaptics-hover.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-synaptics-i2c.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-synaptics-phantomclicks.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-synaptics-pressurepad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-synaptics-rmi4.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-synaptics-st.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-synaptics-t440.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-synaptics-x1-carbon-3rd.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-synaptics-x220.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-tablet-doubledial.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-tablet-mode-switch.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-tablet-rel-dial.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-thinkpad-extrabuttons.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-touch-screen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-touchpad-palm-threshold-zero.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-touchscreen-fuzz.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-touchscreen-invalid-range.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-touchscreen-mt-tool.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-trackpoint.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-uclogic-tablet.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-vmware-virtual-usb-mouse.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-bamboo-2fg-finger.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-bamboo-2fg-pad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-bamboo-2fg-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-bamboo-16fg-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-calibrated-tablet.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-cintiq-12wx-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-cintiq-13hdt-finger.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-cintiq-13hdt-pad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-cintiq-13hdt-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-cintiq-24hd-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-cintiq-24hdt-pad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-cintiq-pro-16-finger.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-cintiq-pro-16-pad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-cintiq-pro-16-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-ekr.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-hid4800-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-intuos3-pad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-intuos5-finger.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-intuos5-pad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-intuos5-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-isdv4-524c-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-isdv4-4200-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-isdv4-e6-finger.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-isdv4-e6-pen.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wacom-mobilestudio-pro-pad.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-waltop-tablet.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-wheel-only.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-xen-virtual-pointer.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-device-yubikey.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-int.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-main.c meson.build: change from config.set10() and #if to config.set() and #ifdef 2025-07-28 12:04:09 +10:00
litest-runner.c test: a skipped test does not count as failure 2025-07-21 11:53:57 +10:00
litest-runner.h Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest-selftest.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
litest.c test: fix two clang-tidy dead store complaints 2025-08-06 07:34:54 +00:00
litest.h test: allow creating a context with a custom plugindir 2025-08-01 15:38:39 +10:00
symbols-leak-test test: print the usage from the symbols-leak-test 2022-11-22 19:02:03 +00:00
test-builddir-lookup.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-device.c evdev: move the SYN_REPORT 1 filtering to the touchpad backend 2025-07-31 00:50:30 +00:00
test-gestures.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-keyboard.c test: fix the keycode obfuscation test 2025-08-01 04:02:57 +00:00
test-library-version.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-log.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-misc.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-pad.c meson.build: change from config.set10() and #if to config.set() and #ifdef 2025-07-28 12:04:09 +10:00
test-path.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-plugins-lua.c lua: implement support for disabling of features 2025-08-07 10:23:30 +10:00
test-pointer.c test: switch another test to use logcapture 2025-08-01 04:02:57 +00:00
test-quirks.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-switch.c test: fix a race condition during a switch test 2025-07-10 00:36:23 +00:00
test-tablet.c plugin: ensure prox out for a forced proximity tool if the tool changes 2025-08-31 00:18:59 +00:00
test-totem.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-touch.c meson.build: change from config.set10() and #if to config.set() and #ifdef 2025-07-28 12:04:09 +10:00
test-touchpad-buttons.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-touchpad-tap.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-touchpad.c meson.build: change from config.set10() and #if to config.set() and #ifdef 2025-07-28 12:04:09 +10:00
test-trackball.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-trackpoint.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-udev.c Run clang-format over the code 2025-07-01 16:42:44 +10:00
test-util-includes.c.in test: rename test-util-includes.c to .c.in 2025-04-04 15:47:23 +00:00
test-utils.c test: correct value type in atou64_test 2025-08-01 22:34:07 +00:00
test_quirks_files.py pre-commit: bump to latest ruff-format 2025-07-09 00:13:00 +00:00
valgrind.suppressions test: grab the device before any lid or tablet mode switches 2020-07-07 18:51:33 +10:00