Commit graph

4369 commits

Author SHA1 Message Date
Peter Hutterer
34fe17f723 Fix the termination of the readlink result
nread is the number of bytes put into the buffer, let's terminate it there
instead of one byte over. This only worked because execdir was initialized to
zero.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-11-10 14:27:22 +10:00
Peter Hutterer
024162e606 gitlab CI: update the comments
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-11-03 14:07:54 +10:00
Peter Hutterer
87e37453f4 gitlab CI: update to latest ci-templates
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-11-03 14:07:08 +10:00
Peter Hutterer
3144d3afe5 gitlab CI: remove a now-unused VERSION variable
This became obsolete with FDO_DISTRIBUTION_VERSION being autogenerated by
templates.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-11-03 14:06:55 +10:00
Peter Hutterer
61947b33f6 gitlab CI: trigger the wayland website pipeline directly
See the documentation here:
https://docs.gitlab.com/ee/ci/multi_project_pipelines.html#trigger-a-pipeline-when-an-upstream-project-is-rebuilt

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-28 03:20:06 +00:00
Peter Hutterer
11d517f969 doc/user: update the timer offset warning for the new "too slow" message
Related #533

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-28 02:58:03 +00:00
Peter Hutterer
5faa3b7ae9 evdev: reduce the "your system is slow" warning to 5 per hour
Two cases where this can happen: system is currently slow and delaying events,
n which case we'll get a burst and it'll show up in the log files anyway. Or
the system is generally slow and we get these warnings all the time. In the
latter case, let's not spam the log.

Fixes #533

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-28 02:58:03 +00:00
Scott Jann
69959c8a3b quirks: add quirk for Dell Precision 7550/7750 touchpad
Signed-off-by: Scott Jann <sjann@knight-rider.org>
2020-10-23 13:35:50 +10:00
Peter Hutterer
b925a0878b quirks: switch the models with missing buttonpad to use the new attr
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-23 13:35:50 +10:00
Peter Hutterer
e882bd0216 quirks: add AttrInputPropEnable and Disable
The latter requires libevdev 1.10 but since that'll take a while to filter
into our various CI systems, let's make it conditional.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-23 13:35:50 +10:00
Peter Hutterer
e3c4ff3898 quirks: add AttrEventCodeEnable as counterpoint to the disable one
Currently unused, but let's get this in because we may need this very soon for
broken tablets.

Enabling EV_ABS axes requires an absinfo struct - we default to a simple 0-1
axis range for those as the most generic option. Anything more custom will
need more custom treatment when we need it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-23 13:35:50 +10:00
Peter Hutterer
30502dee1e evdev: localize two variables during quirks handling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-23 12:54:54 +10:00
Peter Hutterer
fa0c3ee388 evdev: quirks_get_tuples can deal with a NULL quirks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-23 12:53:35 +10:00
Peter Hutterer
1ebdc60576 tools/debug-events: rework touch event printing
Previously, touch up events did not contain the slot number which makes the
logs ambiguous (e.g. see the one in #532). Fix that, and since doing so would
require extra conditions anyway get rid of the current with/without coords
function and just handle it all inside one function instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-21 09:09:50 +10:00
Peter Hutterer
08999899cb Print the event name when using an invalid event type
Where an invalid event type is passed to a function (e.g. a keyboard event to
a touch-related function) we used to only print the event code. That makes
debugging less obvious than necessary, so let's print the event name too.

This requires the function to be moved below event_type_to_str()

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-21 09:09:50 +10:00
Peter Hutterer
b121c350db test: fix the tip one axis test
Only worked because of axis smoothing mangling the coordinates - x is not
supposed to change where we're moving along a vertical line. And the same for
y and horizontal lines.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-08 12:45:10 +10:00
Peter Hutterer
546b7623a3 test: fix the tablet relative calibration test
This test only worked because axis smoothing mangled the coordinates, moving
from 5/10 to 10/20 cannot possibly have a dx of zero.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-08 12:45:10 +10:00
Peter Hutterer
a80fe32503 fallback: expand the range of valid keys
The kernel has since added a bunch of keys in the range between
KEY_ONSCREEN_KEYBOARD and BTN_TRIGGER_HAPPY. Let's designate those as keys so
we handle them correctly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-07 09:38:39 +10:00
Peter Hutterer
442b7b4e34 gitlab CI: add git depth to the coverity job and save the artifacts
A default git depth of 1 means git describe won't work, let's set it to
something high enough that we should always have at least one tag in the
history.

And save the artifacts after the coverity compilation, where the submission
fails for whatever reason we can just resubmit those manually without having
to rebuild the whole image locally.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-07 07:27:13 +10:00
Peter Hutterer
82bf473d99 tools: color-group the debugging messages
Alternate between two randomly-chosen colors for each batch of debug messages
to make it easier to visually group the two.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-07 07:22:52 +10:00
Peter Hutterer
4f282688ac tools: print the libinput_dispatch() counter for debugging messages
The messages with priority DEBUG refer to the various internal state machines
updating, so it's useful to know when they did so. Let's count up every time
we trigger libinput_dispatch() so we know how the messages group together.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-06 16:12:17 +10:00
Peter Hutterer
7244e36b50 tools: only call libinput_dispatch() once per poll
This is a closer approximation of all callers anyway, and it makes it easier
to debug which events are handled per libinput_dispatch() call.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-06 16:12:17 +10:00
Davide Depau
ec939611fd quirks: fix force-press on Apple Magic Trackpad 2
The current defaults detect force presses as palm or thumb.
The values provided here work for a 99% accurate palm/thumb detection
and provide close zero false positives in my tests.

Signed-off-by: Davide Depau <davide@depau.eu>
2020-10-05 20:57:05 +00:00
Peter Hutterer
788c7179a4 doc/api: fix the doxygen output handling
Using output: ['.'] broke ninja after ninja clean - it removed the whole
directory and thus the meson-generated configure_files (i.e. all the
doxygen sources we copied). ninja didn't know how to build those.

Fix this by rearranging the doxygen output to build into a different
directory now and setting the output to that. This doesn't exactly *fix*
things since that directory is no longer removed during ninja clean, but at
least the build no longer fails.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-29 17:48:31 +10:00
Kai-Chuan Hsieh
f0997536a7 quirks: Customize ALPS i2c touchpad palm detect pressure threshold
ALPS i2c touchpad support ABS_PRESSURE and ABS_MT_PRESSURE capabilities,
The default threshold 130 is too easy to across while finger movement.
It will cause the cursor stalled after the threshold is achieved, which
impacts user experience.
Test with some ALPS touchpads 0488:101A, 0488:101D, 0488:101E, the value
180 is good on those platforms.

Signed-off-by: Kai-Chuan Hsieh <kaichuan.hsieh@canonical.com>
2020-09-28 12:12:51 +08:00
satrmb
03e24309fa doc: update touchpad tapping state machine diagram
Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
2020-09-25 06:01:28 +00:00
satrmb
f2faf370e0 test: expand drag and multitap tests to tap with up to 3 fingers
This covers the addition of two- and three-finger tap-and-drag,
as well as the fix for multitaps with more than one finger in later taps
and the multifinger enhancement to the tap ending drag-lock.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
2020-09-25 06:01:28 +00:00
satrmb
44912aa384 touchpad: fix multitaps with more than one finger while dragging is enabled
Also permits any number of fingers in the tap that terminates drag-lock.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
2020-09-25 06:01:28 +00:00
satrmb
0e569077fe touchpad: allow tap-and-drag for two-finger and three-finger taps
This commit duplicates the tap states responsible for tap-and drag (TAPPED
and all DRAGGING* states) to cover two-finger and three-finger taps;
the code for the new states is shared with the existing machinery for
one-finger tap-and-drag.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
2020-09-25 06:01:28 +00:00
satrmb
5e6d03ff19 touchpad: track the release of all fingers in a three-finger tap
This is in preparation for three-finger tap-and-drag, which will start from
a completed tap with no fingers down.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
2020-09-25 06:01:28 +00:00
Peter Hutterer
d35f1319de test: set the elan test device to always double up on tool bits
This is the device from
https://gitlab.freedesktop.org/libinput/libinput/-/issues/259 which sets
BTN_TOOL_PEN in addition to the real tool. Integrate this into the test device
proper so it always does this to catch various outliers.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-22 17:35:41 +10:00
Peter Hutterer
5cda7dfa1b test: move the x/y coords a bit when testing tool type switches
More realistic, there's no way you can get the x/y coordinates exactly the
same when moving the pen back into prox.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-22 17:35:41 +10:00
Peter Hutterer
df2759706f test: auto-assign the tool type for tablet tests
The current tool type test merely sends BTN_TOOL_RUBBER (and others) manually
and expects libinput to do the right thing. This only tests the perfect
sequence but not test weird devices that behave differently on a tool type
switch.

So let's fix this by setting the tool type as property on the libinput test
device itself, and then emulate the tool switch through litest.
For special devices this will need extra callbacks, this is just the initial
framework to handle those buttons.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-22 17:35:41 +10:00
Peter Hutterer
06e7adfca3 tablet: split a ternary condition into a normal if else for readability
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-22 17:35:41 +10:00
Peter Hutterer
e8860fcf55 test: don't run the tool switch test on tablets that require forced prox out
This test only worked because we're emulating events that the device never
sends that way. Just skip the test, devices that require a forced prox out
probably don't handle (or even have) erasers ayway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-22 17:35:41 +10:00
Peter Hutterer
5eb294e434 test: remove duplicate tool type
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-22 17:35:41 +10:00
Peter Hutterer
0e9fe09f1e tablet: group the pressure related bit into a substruct
No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-22 17:35:41 +10:00
Peter Hutterer
1303adbf1b tools/record: compress a set of printfs into one
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-17 12:38:53 +10:00
Peter Hutterer
6e8aba9354 tools/record: prefix the device list with a # character
Too many recordings end up with the device list at the top when users redirect
stderr and stdout to the recordings file. This breaks yaml parsing and
requires manual removal of the first few lines.

Avoid this by prefixing the lines with a command character, this way the yaml
stays correct.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-17 12:38:53 +10:00
Peter Hutterer
2d641e6b7b tools/record: add --grab option
Useful to record devices like power buttons, lid switches, etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-16 23:59:57 +00:00
weizhixiang
7dee616621 check return value for libudev/udev_monitor_filter_add_match_subsystem_devtype
Signed-off-by: weizhixiang <1138871845@qq.com>
2020-09-16 23:32:51 +00:00
weizhixiang
7f2989e2aa remove extra parameter in path_disable_device()
Signed-off-by: weizhixiang <1138871845@qq.com>
2020-09-16 15:56:19 +08:00
weizhixiang
bb84fcc738 check return value for udev_new()
Signed-off-by: weizhixiang <1138871845@qq.com>
2020-09-15 10:42:47 +08:00
Peter Hutterer
5ebd7bd1f0 tools/replay: check the recorded udev properties against the local properties
Where a device is replayed locally for testing, its udev properties should
match the recorded properties. Otherwise the testing results will not be
reliable.

The exception here is the device group which we currently don't set for
emulated devices and even if we did, it may intentionally differ anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-11 04:36:03 +00:00
Peter Hutterer
f86d6a6e5a meson.build: add a few compiler warnings and make them compiler-conditional
These seem like a decent-enough set to have, only -Wlogical-op actually
produced a new warning.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 13:57:39 +10:00
Peter Hutterer
7ad976984e timer: fix a logic error checking the list node
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 13:57:39 +10:00
Peter Hutterer
f00e388686 quirks: fix a logical error checking for A..Z
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 13:57:39 +10:00
Peter Hutterer
c6f87ade84 meson.build: drop the separate cpp flags
All we care about for C++ is that we build.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 13:57:39 +10:00
Peter Hutterer
ad2216b4c8 meson.build: bump minimum version to 0.47
It's been out for 2 years.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 12:36:28 +10:00
Peter Hutterer
5ef4329ceb doc/api: drop the doxygen/graphviz version checks
Both of our minimum versions were released in 2012, no more need to check.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 12:36:28 +10:00