Peter Hutterer
d6f081730a
test: replace some litest_test_param_fetch with getters
...
The _fetch() api isn't very friendly to clang-format so let's use the
one that results in better formatting.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246 >
2025-07-01 16:23:04 +10:00
Peter Hutterer
3df080513a
test: fix automatic -j0 in debugger
...
If we're running in a debugger we want -j0 set by default so we don't
have to follow forks. This was traditionally JOBS_SINGLE but with
the drop of the check framework it's now -j0.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1253 >
2025-06-30 05:58:46 +00:00
Wren Turkal
60abf15755
Fix some inconsistent whitespace.
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1254 >
2025-06-29 17:00:15 -07:00
Kacper Piwiński
812bcd68f7
util: use already computed strlen v2
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252 >
2025-06-29 17:38:48 +00:00
Kacper Piwiński
8ab0e53812
util: don't call function in macro argument v2
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252 >
2025-06-29 07:32:25 +00:00
Kacper Piwiński
8c15a01d16
util: don't call function in macro argument
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252 >
2025-06-29 07:21:27 +00:00
Kacper Piwiński
0c2fd88580
util: use already computed strlen
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252 >
2025-06-29 06:51:51 +00:00
Kacper Piwiński
cc3f0c783a
util: change n type to size_t in strneq
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252 >
2025-06-29 06:38:52 +00:00
Peter Hutterer
2b22a0b4ba
meson.build: require libevdev 1.10
...
Released in 2020, that's plenty old enough now to get rid of an ifdef.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1250 >
2025-06-27 08:21:13 +00:00
Peter Hutterer
2e0c3c4af4
test: only check error messages for bugs
...
The use of the bug log handler should be replaced with the captured logs
now but meanwhile: don't abort if we're running in --verbose mode and
something prints a debug message before our expected bug error message.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1250 >
2025-06-27 08:21:13 +00:00
Peter Hutterer
d9a949657e
touchpad: rename a function for consistency
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1250 >
2025-06-27 08:21:13 +00:00
Peter Hutterer
fc70dc90f0
test: replace two goto outs with _unref_
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1250 >
2025-06-27 08:21:13 +00:00
Peter Hutterer
dc8f7c3671
util: allow strv_from_string() with NULL nelems
...
The caller may not care about the number of elements, let them be
careless.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1250 >
2025-06-27 08:21:13 +00:00
Peter Hutterer
9a8254fbb6
doc/user: update architecture docs with the plugin pipeline
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1248 >
2025-06-27 04:11:40 +00:00
José Expósito
d1800a76fe
evdev: Handle scroll wheel with a plugin
...
Transform the code present in evdev-wheel.c into a internal plugin.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1235 >
2025-06-25 00:43:29 +00:00
José Expósito
ee35e04207
wheel: Remove unnecessary pending event
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1235 >
2025-06-25 00:43:29 +00:00
José Expósito
5bc683c8dd
wheel: Drop high-resolution wheel emulation workaround
...
Remove the workaround used to emulate high-resolution wheel scroll
events on kernels < 5.0 (~6 years old kernels).
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1235 >
2025-06-25 00:43:29 +00:00
José Expósito
ed3cb9cc48
fallback: Remove fallback_init_debounce() declaration
...
A leftover from commit 2c6fa261a3 ("evdev: replace the debounce
handler with a plugin")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1247 >
2025-06-24 10:12:12 +02:00
Peter Hutterer
e99f0c995e
evdev: rename evdev_device_dispatch_one to evdev_device_dispatch_frame
...
Because it now takes a frame as argument, no longer a single event.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1244 >
2025-06-24 03:14:16 +00:00
Peter Hutterer
f003dbb6cb
plugins: fix the timer name for the tablet proximity timer
...
Since every device has one of those, let's name it after the device's
system.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1244 >
2025-06-24 03:14:16 +00:00
Peter Hutterer
d2316d7e93
plugins: fix some indentation in the eraser button plugin
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1244 >
2025-06-24 03:14:16 +00:00
Peter Hutterer
65e7cd5953
tools: handle an empty quirks list in the libinput recording
...
Fixes: 548279abee ("tools: store virtual property in recordings")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1243 >
2025-06-24 02:57:31 +00:00
Peter Hutterer
a2694738cb
tools: per-slot-delta initialize the pressure thresholds to zero
...
Python is unhappy about comparing None to > 0
Fixes: 9c042e9620 ("tools: add pressure threshold support to analyze per-slot-delta")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1243 >
2025-06-24 02:57:31 +00:00
Peter Hutterer
2c6fa261a3
evdev: replace the debounce handler with a plugin
...
Same functionality but run as a plugin on the evdev stream instead.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1230 >
2025-06-24 12:01:51 +10:00
Peter Hutterer
7d8fac2868
quirks: add a helper function for returning quirks for a device
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1230 >
2025-06-24 12:01:51 +10:00
Peter Hutterer
6f403a0cc9
evdev: replace get_key_type with evdev_usage_is_button/key
...
Makes this easier to use from other areas and we never cared about the
key type NONE anyway.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1230 >
2025-06-24 12:01:51 +10:00
Borui Wang
9b28e7fd35
quirks: disable BTN_RIGHT on MS Surface Pro Flex Keyboard
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1236 >
2025-06-23 23:21:12 +00:00
Peter Hutterer
b61a896407
util: fix the ANSI escape codes for bright colors, add some more
...
The previous incarnations of BRIGHT_FOO were actually bold foo. Change
the colors over to use the actual bright colors and make bold a separate
set of defines.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1240 >
2025-06-23 12:52:57 +00:00
Peter Hutterer
0678ef2b98
util: add white to the ansi color escape codes
...
Can't be used because it's near invisible on white backgrounds
but have it for completeness.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1240 >
2025-06-23 12:52:57 +00:00
Peter Hutterer
28a681932c
wheel: match the state debug prefix with our other debug logs
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1240 >
2025-06-23 12:52:56 +00:00
José Expósito
3a3e292d43
wheel: Rename scroll timeout callback function
...
The function name doesn't represent what the function really does.
Rename it and be consistent with the naming of other related functions
like wheel_set_scroll_timer() or wheel_cancel_scroll_timer().
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1241 >
2025-06-23 02:18:24 +00:00
José Expósito
2461cdf497
wheel: Use libinput_device_has_capability()
...
Use this helper instead of checking manually.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1241 >
2025-06-23 02:18:24 +00:00
José Expósito
35598db1ce
wheel: Remove unused argument from fallback_wheel_process_relative()
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1241 >
2025-06-23 02:18:24 +00:00
José Expósito
973d5ea587
wheel: Remove unused argument from fallback_rotate_wheel()
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1241 >
2025-06-23 02:18:23 +00:00
cptpcrd
84085edc04
pad: honor send-events mode
...
The custom implementation of the send-events mode for tablet pads does
not actually suspend and resume the device, so events continue to be
sent despite the device being theoretically disabled. Fix this by
removing the custom send-events implementation in favor of
evdev_dispatch's implementation.
Also add a simple test to ensure the send-events mode works.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1238 >
2025-06-23 01:58:29 +00:00
Peter Hutterer
fca5154d1d
touchpad: fix a debug message "released" -> "is no longer palm"
...
The touch itself remains down and is now considered a finger again, so
let's make this message less ambiguous.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1239 >
2025-06-23 10:40:37 +10:00
Peter Hutterer
29bb231114
plugin: require plugins to enable the frame callback for a device
...
The vast majority of plugins are only interested in a single or a few
devices. Require that they enable the frame callback for those devices
and don't notify them for any other frames.
Give each plugin a unique index and use that for a bitmask to check if
the plugin wants events for a particular device. If not, skip it.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1229 >
2025-06-20 09:06:45 +00:00
Peter Hutterer
b31326dd02
plugin: log a debug message when a plugin terminates the event frame list
...
Our last plugin is our own evdev handling code so if the event queue
is empty before then that means a plugin has discarded the frame(s).
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1229 >
2025-06-20 09:06:45 +00:00
Peter Hutterer
a6f7f55178
plugin: only load the plugin system once
...
This got lost during one of the many rebases, see
https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1217#note_2961314
It is required even without public-facing plugins so we don't end up
with duplicated plugins for every device added with
libinput_path_add_device().
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1229 >
2025-06-20 09:06:45 +00:00
Peter Hutterer
b3cbc6053f
test: handle plugin bugs and log messages in the test suite
...
For the bug log handler check we need to print our message to search for
the "plugin bug:" prefix. And since we have that message printed now
anyway we might as well add it to the abort message.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1229 >
2025-06-20 09:06:44 +00:00
Peter Hutterer
8f132481b3
zsh: add shell completion for the eraser button
...
Plus a note in tools/shared.h so we don't keep forgetting about this.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1234 >
2025-06-20 10:01:20 +10:00
Peter Hutterer
4336c0456f
zsh: fix shell completion for set-area
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1234 >
2025-06-20 10:01:20 +10:00
Jan Engelhardt
d67d45a8fd
Teach meson about pkgconfig Requires.private
...
Fixes: ed87c6dbb0 ("Add libudev and -lm to Requires.private")
added Requires.private, 4f4bfae2a1 ("Add meson.build file")
forgot to transplant the logic to meson.build.
Fixes: 4f4bfae2a1 ("Add meson.build file")
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1232 >
2025-06-19 13:05:26 +00:00
Peter Hutterer
b1bc500e0d
Remove unused pc.in files
...
These have not been used since the switch to meson.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1232 >
2025-06-19 13:05:26 +00:00
Peter Hutterer
f6c4a361c0
tools: disable GTK's deprecated warnings
...
I'd be surprised if those get removed before the whole X11 support is
removed - and in that case we can remove the x11 support as well.
So let's disable the warnings and deal with it when it truly breaks -
there are no replacements for what we want to do here after all.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1233 >
2025-06-19 14:50:25 +10:00
Peter Hutterer
56f0524115
tablet: always allow BTN_STYLUS* for eraser button configuration
...
If the button we want to map to isn't enabled by the kernel allow
setting the button nonetheless. On some tablets we only get the
actual number of button codes (e.g. BTN_STYLUS only on an Inspiroy 2S)
so not being able to map the eraser button to some other button makes
this whole feature a bit pointless.
Special-case BTN_STYLUS* because these are the ones we'll always allow.
This fixes an issue with the eraser button defaulting to BTN_STYLUS2
on some devices but it couldn't actually be set to that value by the
caller.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1231 >
2025-06-19 01:51:52 +00:00
Peter Hutterer
34da27650d
tablet: take an uint32_t for the eraser button
...
For consistency with other set_button configuration options.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1231 >
2025-06-19 01:51:52 +00:00
Peter Hutterer
9c042e9620
tools: add pressure threshold support to analyze per-slot-delta
...
Color touches above the minimum threshold and above the down threshold
so it's easier to analyze a recording. Sometimes touches move
unexpectedly but if it's low-enough pressure this may not affect
libinput.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1225 >
2025-06-19 00:00:48 +00:00
Peter Hutterer
c48aff86d7
tablet: implement eraser button disabling
...
This adds a new (internal) plugin that is responsible for eraser button
disabling.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1218 >
2025-06-18 19:38:14 +10:00
Peter Hutterer
42c0bff29b
plugin: add internal api to notify plugins of tool configuration
...
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1218 >
2025-06-18 19:38:14 +10:00