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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>