Commit graph

5059 commits

Author SHA1 Message Date
Peter Hutterer
1d4e2e2e2d gestures: log the finger count together with the gesture state
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1049>
2024-10-04 15:13:23 +10:00
Wentao Guan
4785a1cc09 quirks: add a quirk for the HONOR MagicBook Art 14 touchpad
The touchpad need ModelPressurePad=1 to enable moving cursor,
and need AttrEventCode=-BTN_RIGHT to use right key by touchpad
two-fingers press..

Closes: #1040
Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1040
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1053>
2024-10-02 09:52:55 +00:00
WeirdTreeThing
9b4fefc972 quirks: Add quirk for Google Chromebook Cret
Signed-off-by: Brady Norander <bradyn127@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1056>
2024-10-02 06:00:05 +00:00
Ajrat Makhmutov
c012e8a12a quirks: touchpad quirk for ICL Si1516/Si1512
Exactly the same quirk as for Graviton N15i-k2 and Graviton N15i.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1054>
2024-10-02 05:43:06 +00:00
Ajrat Makhmutov
601c1043b3 quirks: touchpad quirk for Graviton N15i
Exactly the same quirk as for Graviton N15i-K2.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1054>
2024-10-02 05:43:06 +00:00
Peter Hutterer
b43061694c CI: skip the valgrind tests for marge-bot
marge-bot rebases and edits the commit message but there's not way for
it to introduce a memleak that wasn't spotted in the user pipeline
first. Since those tests are very flaky, let's skip them when running
the marge-bot pipeline.

Closes #1042

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1057>
2024-09-30 17:30:53 +00:00
Peter Hutterer
54dccd66d1 Fix a few potential NULL dereferences
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1052>
2024-09-30 15:35:36 +00:00
Peter Hutterer
1790171c76 util: add a safe version of strlen
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1052>
2024-09-30 15:35:36 +00:00
Daniel Fuchs
da6059b2fe quirks: adjust pressure range for Google Krane, Wormdingler and Coachz
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1055>
2024-09-24 16:09:26 +00:00
Peter Hutterer
a4ff6d5d0b tools: add --set-calibration to the debug-events man page
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1051>
2024-09-20 21:06:15 +10:00
Peter Hutterer
e89bf25c10 test: fix macro grouping in the litest.h header
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
2024-09-19 23:43:53 +10:00
Peter Hutterer
25bdda0b8a test: use litest_assert_event_type instead of direct type check
This provides better debugging logs and is slightly less code in
the checks too.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
2024-09-19 23:43:53 +10:00
Peter Hutterer
011c1474d3 test: use litest_wait_for_event instead of a NONE event check
Technically we're not really waiting here since we expect the
event to already be there but for these tests the distinction doesn't
matter.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
2024-09-19 23:41:24 +10:00
Peter Hutterer
24d9b46b43 test: fix use of wrong enum for setting clickfinger maps
Hidden by ck_asset_int_eq type-casing everything to intmax_t

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
2024-09-19 23:41:24 +10:00
Peter Hutterer
f8e44f1947 test: use litest_assert_empty_queue instead of a manual none check
This provides better debugging printfs and is the now-recommended way to
check this.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
2024-09-19 23:41:23 +10:00
Peter Hutterer
86c47be816 test: add litest_dispatch() for better test debugging
Wraps libinput_dispatch() with a location which will make things a bit
easier to track. Output (in --verbose) is something like:

  gestures_swipe_3fg_unaccel_fn():1346 - dispatching

Which makes it easier to associate the various calls to libinput
dispatch with the other output from libinput.

This patch switches all uses of libinput_dispatch() in test cases over
but not the litest functions that may call dispatch too. Remains to be
seen if that is necessary.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
2024-09-19 15:21:04 +10:00
Peter Hutterer
27e3897420 test: abort on libinput bugs again
This was always intended but a bug prevented the actual abort.
strstr returns NULL when we cannot find the substring so we always
triggered the first noop condition on bugs.

Fixes: bd7b91065b ("evdev: warn if our event processing lags by 10ms or more")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
2024-09-19 15:07:50 +10:00
Peter Hutterer
596d86ecc1 test: improve event debugging a bit
Add a litest_checkpoint macro and convert a few of the litest_assert
macros to make use of that - this gives us a printf of the call site in
case it fails.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
2024-09-19 15:07:44 +10:00
Peter Hutterer
721426a1be test: highlight the gesture state machine log messages in yellow
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
2024-09-12 15:24:47 +10:00
Peter Hutterer
b1b3692e08 gestures: use a colon-suffixed debug prefix like the other state machines
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
2024-09-12 15:24:45 +10:00
Peter Hutterer
0ec0a4212a test: make litest_wait_for_event_of_type auto-terminating
Wrap this in a macro so we cannot forget to pass -1

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
2024-09-12 12:37:55 +10:00
Peter Hutterer
d0bec3843a test: make litest_drain_events_of_type auto-terminating
Wrap this in a macro so we cannot forget to pass -1

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1048>
2024-09-12 12:37:50 +10:00
Peter Hutterer
0014400253 triage-policies: add reminder for info in commit messages
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1043>
2024-09-12 01:56:48 +00:00
Peter Hutterer
7da1af60cf triage-policies: add a blurb for the help-needed label
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1043>
2024-09-12 01:56:48 +00:00
Peter Hutterer
33612fb37c tools/debug-events: move the event type str to a helper function
This isn't really necessary for the code as-is it makes debugging things
easier.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1044>
2024-09-12 00:59:13 +00:00
Peter Hutterer
e8495b8d36 gestures: cancel the hold before initializing the pinch
If we're in state HOLD we have an ongoing hold gesture - make sure we
cancel that one first before we initialize the pinch.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1046>
2024-09-11 09:38:29 +00:00
Peter Hutterer
efdd536120 triage-policies: point to the new hid-recorder written in rust
It provides a more useful and easier to read report output, so let's go
with that.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1045>
2024-09-11 06:44:28 +00:00
Peter Hutterer
83be519fc2 CI: retry valgrind jobs if they fail
Our valgrind jobs are very timing-sensitive so it's very common that
they fail with an error when the reason is just valgrind being slower
and we miss a deadline somewhere.

Retry them if they fail, hopefully that gives us more reliable
pipelines.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1040>
2024-09-11 04:58:52 +00:00
Peter Hutterer
dc249b0ffe tools/debug-events: add ability to compress motion events
If --compress-motion-events is given (and stdout is a tty) reduce
the output printed to one line per repeated motion/axis/scroll sequence
(with a count). Example output:
 event6   POINTER_MOTION          108 +1.912s	 1.00/ -1.00 ( +1.00/ -1.00))
 event6   POINTER_BUTTON              +2.008s	BTN_LEFT (272) pressed, seat count: 1
 event6   POINTER_BUTTON              +2.074s	BTN_LEFT (272) released, seat count: 0
 event6   POINTER_MOTION           39 +5.249s	 0.00/  0.99 ( +0.00/ +1.00)
 event6   POINTER_BUTTON              +5.385s	BTN_LEFT (272) pressed, seat count: 1
 event6   POINTER_MOTION           66 +6.031s	-1.00/  0.00 ( -1.00/ +0.00)
 event6   POINTER_BUTTON              +6.401s	BTN_LEFT (272) released, seat count: 0

The event count (108, 39 and 66) is only printed for more than one event
in sequence so the output is otherwise identical (but 4 spaces wider
now)

If stdout is not a tty the event count is printed but no compression
happens since we rely on a ansi escape sequence for that. Could be fixed
by changing the current print statements to print a \n before the
current event instead of at the end of the current line.

This makes debugging events easier as button events and similar are no
longer obscured by pages of motion events in between.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1041>
2024-09-11 12:49:28 +10:00
Peter Hutterer
09fd1cdd98 tools/debug-events: ignore old-style pointer axis events completely
Since they're interleaved with the more modern finger/wheel/continuous
events they mess up our repeate count, preventing compression for those
events.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1041>
2024-09-09 15:41:45 +10:00
Peter Hutterer
41b3f5cc29 doc/api: fix wrong references to the tap drag config
It's _tap_get_drag_, not _tap_drag_get_ (and same for set/get_default)

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1039>
2024-09-06 04:23:19 +00:00
Peter Hutterer
f159abdc57 quirks: allow for parsing multiple products
This allows for a slight optimization of the quirks parser: where
multiple devices from the same vendor require the same quirk, allow
for multiple product matches in the form:

MatchProduct=0x0001;0x0002;

This is stored as a fixed-sized zero-terminated array - a product ID of
zero isn't something we need to worry about in real situations.

Closes #879

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1038>
2024-09-05 13:54:07 +00:00
Peter Hutterer
ea7ad8d25c util: add a strv_for_each helper function
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1038>
2024-09-05 13:54:07 +00:00
satrmb
910d59e836 touchpad: add sticky mode to drag-lock
Sticky mode removes the timeout from drag-lock, only a tap ends a drag.
Timeout mode remains available without changes.

Sticky mode is exposed as a new value for the existing drag-lock setting.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1037>
2024-09-05 00:47:47 +00:00
José Expósito
ee9043d6b4 CI: Run pre-commit hooks
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1036>
2024-09-03 09:51:41 +02:00
José Expósito
7d849623d5 Fix pre-commit errors
Some files had pre-commit style issues. Fix them.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1036>
2024-09-03 09:51:41 +02:00
Tim Hanson
60e569941c Update quirks for HP Dragonfly Chromebook
Closes: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1034
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1033>
2024-08-31 12:18:12 +02:00
Peter Hutterer
86095429cd quirks: add quirk for Razer Blade 142024 Keyboard
Generated by tools/razer-quirks-lister.py

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1031>
2024-08-26 07:42:00 +00:00
Peter Hutterer
15697685c6 triage-policies: add an entry for pointing users to 60-evdev.hwdb
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1032>
2024-08-26 14:43:09 +10:00
Peter Hutterer
3402f38001 libinput 1.26.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2024-08-19 09:26:22 +10:00
Jason Gerecke
66106b9746 tablet: Remove unnecessary scale factor on REL_HWHEEL_HI_RES
The two high-res axes should already be scaled appropriately by the
kernel. This unnecessary scale factor causes 1 click of the dial to
produce an event delta of +-14400 rather than the expected +-120.

Fixes: beca998122 ("tablet: add API for relative dials")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1029>
2024-07-29 22:46:57 +00:00
Jami Kettunen
2135b4a6af quirks: add quirk for Minisforum V3 touchpad dwt
Disable while typing didn't work since the detachable (USB)
keyboard/touchpad case weren't being considered as one unit; mark the
keyboard as internal to correct this.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1028>
2024-07-20 20:43:43 +03:00
Peter Hutterer
6f19267c1e doc/user: fix a typo
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1027>
2024-07-19 10:07:49 +10:00
Jami Kettunen
c4f57bbc62 quirks: add quirk for the Minisforum V3 volume keys
They didn't work without the keyboard case also being attached to the
tablet PC.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1026>
2024-07-07 22:16:50 +03:00
Andre Kuehne
269875aa0e quirks: add quirk for the LG gram 14 2023 Touchpad
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1025>
2024-07-04 20:04:03 +02:00
José Expósito
c201be9b1b doc/user: document ModelTouchpadPhantomClicks quirk
Related https://gitlab.freedesktop.org/libinput/libinput/-/issues/1013

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1023>
2024-07-04 10:11:36 +00:00
Nicolas Fella
951ab12afe Fix typo in documentation comment
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1024>
2024-07-03 15:13:58 +02:00
Peter Hutterer
124431a5d3 libinput 1.26.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2024-06-27 12:48:55 +10:00
Peter Hutterer
6fee92c959 pad: switch the REL_WHEEL direction to match dials with scroll wheels
REL_WHEEL sends -1 for "down" and +1 for "up", so let's make sure we
keep that correct here too.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1021>
2024-06-21 10:02:07 +10:00
Peter Hutterer
436bb5cc56 test: fix the pad dial test, values need to be equal, not >=
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1021>
2024-06-21 10:00:42 +10:00