summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
45 hoursevdev: discard any frame with EV_SYN SYN_REPORT 1HEADmainPeter Hutterer2-1/+45
When the kernel inserts a repeat frame it does that with EV_KEY code value of 2 and the frame itself is a SYN_REPORT with value 1. Nothing in libinput wants those repeat values, so let's discard them here before anything tries to process them. This inserted frame causes bugs on touchpads with EV_REP (rare enough) because while the key event itself is dropped, the timestamp of the frame still causes the next real frame's delta time to shorten, resulting in wrong acceleration values. Closes #1149 Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1255>
45 hourstest: write pad events with a SYN_REPORT 0Peter Hutterer1-0/+2
The previous loop wrote whatever ring/strip value into the SYN_REPORT event, causing frames with e.g. EV_SYN SYN_REPORT 7. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1255>
45 hourstest: de-duplicate some pad event handling with a helperPeter Hutterer1-32/+14
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1255>
2 daystest: keep waiting for a udev device on EAGAINPeter Hutterer1-0/+3
This shouldn't happen because we turn off O_NONBLOCK on the udev monitor's fd but sometimes this call fails with EAGAIN. If that happens, keep busy-looping until we get some other error or success. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1257>
2 daystest: if we fail to receive our udev device, abort with a useful errorPeter Hutterer1-1/+6
This frequently fails when the runners are busy, so let's at least print the errno to have *some* idea of what is failing. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1257>
2 daysCI: retry valgrind jobs on failurePeter Hutterer2-0/+35
90% of failed valgrind jobs are caused by a race condition when a runner is too slow. Instead of waiting for someone to click the retry button let's just retry immediately again. This could be fine-tuned to check for valgrind errors vs test suite errors but for now this should do. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1257>
3 daysMove mtdev into a pluginPeter Hutterer12-97/+336
mtdev is used only for MT Protocol A device of which there are quite few. But that protocol is also a perfect example for event frames in -> different event frame out so let's move this into the plugin pipeline. Because the plugin doesn't really have full access to the device's internals we set up mtdev base on the libevdev information rather than just handing it the fd and letting it extract the right info. A minor functionality change: previously mtdev-backed devices returned zero on libinput_device_touch_get_touch_count(). Now it is hardcoded to 10 - the number of callers that care about this is likely near zero. Because it's now neatly factored out into a plugin we can also make mtdev no longer a strict requirement. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1245>
3 daysSwitch our internal dispatch interface to take an evdev framePeter Hutterer8-91/+167
No functional changes, all the actual interfaces now simply loop through the frame instead of expecting the dispatcher to do so. The mtdev code changed slightly since we can shortcut in the non-mtdev case. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1245>
3 daysAdd evdev_frame_append_one()Peter Hutterer5-37/+78
This is the most common usage, let's add a helper. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1245>
3 daysgit: add git-blame-ignore-revs to ignore the clang-format commitsPeter Hutterer1-0/+21
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1256>
3 daysplugin: only register the wheel plugin on devices that have a wheelPeter Hutterer1-5/+29
Touchpad devices are pointers too in libinput but they don't usually have wheels. Let's check for REL_WHEEL in device_new *and* then again for the actual pointer capability in device_added. Fixes: d1800a76fec9 ("evdev: Handle scroll wheel with a plugin") Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1251>
3 daystest: correct two capability checksPeter Hutterer1-3/+2
We have one test device that only has a horizontal scroll wheel but not a vertical one, causing these tests to run unexpectedly. One test needs both enabled (not strictly so but let's not bother) and the other one only needs the vertical wheel. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1251>
3 daystest: update a test for current kernelsPeter Hutterer2-0/+2
This device was added before high-res scroll events existing in the kernel and it's used in a test to verify that a device that has ABS_MT_POSITION_X but not _Y doesn't get automatically ignored. Said test (device_quirks_no_abs_mt_y) uses a wheel event to verify that we do get events from this device. Since then we've long had kernels that support hi-res scrolling and the kernel takes care of those events for us. So let's update the device description and the events we send to include the high-resolution events. That doesn't change the validity of the test but stops it from becoming a false positive. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1251>
4 daysAdd a clang-format file for consistent code formattingPeter Hutterer3-0/+87
This *mostly* resembles our current coding style, at least to the extent possible with clang-format. There are a few oddities but they're not worth fighting over (for now) and the most egregious violations have been addressed by shuffling things around or just disabling clang-format in the previous commits. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
4 daysRun clang-format over the codePeter Hutterer235-11462/+10440
This uses the .clang-format file in the follow-up commit, but committed prior to that to ease review of said file and various integrations. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
4 daystest: add missing libevdev and util-mem includesPeter Hutterer1-0/+2
This only worked because of the include order. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
4 daystest: disable clang-format in test collectionsPeter Hutterer19-1/+48
It's too much effort fighting clang-format for these snippets which all don't really do much anyway but are important to be read easily. Let's categorically disable all formatting in the test collections and move on. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
4 daysAdd trailing commas to prevent clang-format odditiesPeter Hutterer35-190/+190
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
4 daystest: add clang-format directives to prevent formattingPeter Hutterer112-3/+483
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
4 daystest: switch more tests to litest_with_parametersPeter Hutterer1-42/+23
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
4 daystest: move a comment to avoid confusing clang-formatPeter Hutterer1-2/+2
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
4 daystest: add missing NULL for a test device's udev propertiesPeter Hutterer1-0/+1
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
4 daystest: replace some litest_test_param_fetch with gettersPeter Hutterer1-43/+28
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>
5 daystest: fix automatic -j0 in debuggerPeter Hutterer1-2/+11
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>
5 daysFix some inconsistent whitespace.Wren Turkal1-15/+15
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1254>
5 daysutil: use already computed strlen v2Kacper Piwiński1-3/+3
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252>
6 daysutil: don't call function in macro argument v2Kacper Piwiński1-1/+2
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252>
6 daysutil: don't call function in macro argumentKacper Piwiński1-1/+2
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252>
6 daysutil: use already computed strlenKacper Piwiński1-1/+1
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252>
6 daysutil: change n type to size_t in strneqKacper Piwiński1-1/+1
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1252>
8 daysmeson.build: require libevdev 1.10Peter Hutterer4-22/+5
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>
8 daystest: only check error messages for bugsPeter Hutterer1-1/+2
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>
8 daystouchpad: rename a function for consistencyPeter Hutterer1-4/+4
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1250>
8 daystest: replace two goto outs with _unref_Peter Hutterer1-23/+13
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1250>
8 daysutil: allow strv_from_string() with NULL nelemsPeter Hutterer1-4/+6
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>
8 daysdoc/user: update architecture docs with the plugin pipelinePeter Hutterer1-11/+100
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1248>
10 daysevdev: Handle scroll wheel with a pluginJosé Expósito7-484/+727
Transform the code present in evdev-wheel.c into a internal plugin. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1235>
10 dayswheel: Remove unnecessary pending eventJosé Expósito2-8/+3
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1235>
10 dayswheel: Drop high-resolution wheel emulation workaroundJosé Expósito2-25/+1
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>
11 daysfallback: Remove fallback_init_debounce() declarationJosé Expósito1-1/+0
A leftover from commit 2c6fa261a3b6 ("evdev: replace the debounce handler with a plugin") Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1247>
11 daysevdev: rename evdev_device_dispatch_one to evdev_device_dispatch_framePeter Hutterer1-2/+2
Because it now takes a frame as argument, no longer a single event. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1244>
11 daysplugins: fix the timer name for the tablet proximity timerPeter Hutterer1-1/+1
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>
11 daysplugins: fix some indentation in the eraser button pluginPeter Hutterer1-2/+2
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1244>
11 daystools: handle an empty quirks list in the libinput recordingPeter Hutterer1-1/+1
Fixes: 548279abeef5 ("tools: store virtual property in recordings") Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1243>
11 daystools: per-slot-delta initialize the pressure thresholds to zeroPeter Hutterer1-2/+2
Python is unhappy about comparing None to > 0 Fixes: 9c042e962010 ("tools: add pressure threshold support to analyze per-slot-delta") Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1243>
11 daysevdev: replace the debounce handler with a pluginPeter Hutterer6-613/+867
Same functionality but run as a plugin on the evdev stream instead. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1230>
11 daysquirks: add a helper function for returning quirks for a devicePeter Hutterer7-115/+41
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1230>
11 daysevdev: replace get_key_type with evdev_usage_is_button/keyPeter Hutterer4-83/+74
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>
11 daysquirks: disable BTN_RIGHT on MS Surface Pro Flex KeyboardBorui Wang1-0/+6
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1236>
11 daysutil: fix the ANSI escape codes for bright colors, add some morePeter Hutterer4-15/+44
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>