Commit graph

4109 commits

Author SHA1 Message Date
Peter Hutterer
a3fb9bd7db libinput 1.15.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 11:21:16 +10:00
Peter Hutterer
428acee867 tools: record: record basic os-release information as well
Because sometimes it's useful to know what distro a recording was made on, and
the kernel version doesn't always reveal that.

Fixes #428

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-19 08:31:18 +00:00
Peter Hutterer
7198e33ecf tools: record: rename a variable to just buf
Better name for re-use

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-19 08:31:17 +00:00
Peter Hutterer
1954523309 gitlab CI: handling killing the qemu process better
If qemu has already shut down by the time we call kill, pgrep returns nothing
and we fail the script. Let's not do that. And let's replace kill pgrep with
just pkill in the process.

Let's get rid of the after_script part too, gitlab kills any process started
in the main script anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-19 08:03:30 +00:00
Peter Hutterer
337ab84599 gitlab CI: print a warning when our VM startup fails
This happens on packet-3 and packet-4 atm, so let's print out a clear warning
that whatever the failure is, it's not directly related to libinput.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-19 07:45:40 +00:00
Peter Hutterer
06591e5913 touchpad: sync the initial tracking id state to the touchpad
Where fingers are down during startup we need to sync them to the known state
of the device so our slot count is correct. Otherwise, when the fingers are
lifted we will trigger the new assert for nactive_slots being less than 0.

Regression introduced in eb6ef9fe70

Fixes #429

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-18 17:11:35 +10:00
Peter Hutterer
1e1b9c0e60 touchpad: never reduce the slot count to 0
Where a user releases all touches during a SYN_DROPPED and then puts more than
one finger back down before we sync, we end up with nonzero fake touches but
a zero slot count. This is caused by a wrong event sequences provided by
libevdev in that case.

This really needs to be fixed in libevdev, see
https://gitlab.freedesktop.org/libevdev/libevdev/merge_requests/19

In the meantime, put a check in to ignore that case and never reduce the slot
count to 0. It still leaves us open for some issues where 3fg gestures may
stop working if the right sequences are triggered during SYN_DROPPED but
updating libevdev will eventually make that go away too.

Fixes #422

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-18 06:26:56 +00:00
Victor Brekenfeld
0da2e744ea quirks: Add quirk for MadCatz RAT7 mouse
Signed-off-by: Victor Brekenfeld <github@drakulix.de>
2020-02-15 20:24:00 +01:00
Peter Hutterer
07a86b85dd tablet: don't force a proximity out while buttons are down
While buttons are down, don't let a forced proximity out happen. If the tablet
goes out of proximity normally that's fine but we don't force a proximity out.

Remains to be seen if this causes stuck buttons now on devices that rely on
the forced proximity out...

Fixes #403

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-13 04:53:27 +00:00
Peter Hutterer
ea78fef450 test: drop a wait in favor of direct event processing
We know we should have an event here, so we might as well process it
immediately to speed the error case up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-13 04:53:27 +00:00
Peter Hutterer
664ecaa152 test: fix a duplicate button down where we want a button press + release
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-13 04:53:27 +00:00
Peter Hutterer
eb085bddec test: mark the tablets that require forced prox out as such
Because certain things are hard to test when you have to guess whether a
tablet has forced proximity out or not. Currently unused, see future patches.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-13 04:53:27 +00:00
Peter Hutterer
0dcb02d369 test: add a test case for checking EVDEV_ABS overrides
Problem: it's still not a 100% check because the way real udev handles the
EVDEV_ABS overrides ignores any that are set through udev properties only. So
we manually have to trigger the keyboard builtin for our test device which
can give us false positives (e.g. it wouldn't have detected #424). But still,
it'll alert us if the actual overridden values are different to what we
expect.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-12 21:22:01 +10:00
Peter Hutterer
5a51add5f3 test: drop the #define for the litest device rules
This was more useful when we installed multiple device rules but now it's only
one file anyway. Also, this drops the inadvertant double-dash
(e.g. 99-litest--Jo7Ji8.rules) which made the file name look like some
substitution was missing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-12 19:23:36 +10:00
Peter Hutterer
8040f94637 udev: directly import the device groups
No need for the indirection of PROGRAM, then ENV for the output value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-12 19:23:36 +10:00
Peter Hutterer
19898eb2b2 udev: *add* the fuzz-to-zero program to the udev RUN list, don't overwrite
For historical reasons, the keyboard builtin that sets the EVDEV_ABS values is
added as RUN. When we add our own fuzz-to-zero tool we must use +=, just using
an equals overwrites the existing RUN list.

The same is true for the IMPORT command we use to extract the fuzz to begin
with.

Fixes #424

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-12 19:22:50 +10:00
Peter Hutterer
ed1d181cf6 tools: record: record the EVDEV_ABS properties correctly
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-07 16:18:27 +10:00
Peter Hutterer
ac2cfea5d2 libinput 1.15.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-03 14:28:44 +10:00
Peter Hutterer
71830dd460 tablet: fix the handling of axis updates after a forced proximity out
Where a pen was forced out of proximity and an eraser came into proximity
without axis updates on the prox-in, subsequent axis updates would trigger the
pen back into proximity. This resulted in two tools in proximity at once
though the new pen never went out of proximity

This would trigger crashes in various compositors/applications, see
https://github.com/xournalpp/xournalpp/issues/1141#issuecomment-578362497

The cause was a wrong condition introduced in ffd8c71e4e. We only need to
force the pen bit on if the current tool state is currently zero and no tool
update was sent with the axis event. In our case, the tool state is nonzero
already (eraser) and we can skip this bit.

Fixes #418

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-02 23:46:14 +00:00
Peter Hutterer
8705aba2ea test: add helper functions for checking proximity events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-02 23:46:14 +00:00
Peter Hutterer
736de2f9a7 test: add a comment to a test device
Just so I don't have to look up the git history next time

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-02 23:46:14 +00:00
Peter Hutterer
0a2bbdf6e7 tools: record: record the EV_ABS deltas along with the absolute value
It's useful to have this in the immediate recording. Example output now:

 - evdev:
    - [  2, 300309,   3,  47,       0] # EV_ABS / ABS_MT_SLOT               0
    - [  2, 300309,   3,  54,    3547] # EV_ABS / ABS_MT_POSITION_Y      3547 (+8)
    - [  2, 300309,   3,  58,      70] # EV_ABS / ABS_MT_PRESSURE          70 (-14)
    - [  2, 300309,   3,  47,       1] # EV_ABS / ABS_MT_SLOT               1
    - [  2, 300309,   3,  54,    3112] # EV_ABS / ABS_MT_POSITION_Y      3112 (+4)
    - [  2, 300309,   3,  58,      68] # EV_ABS / ABS_MT_PRESSURE          68 (-4)
    - [  2, 300309,   3,   1,    3547] # EV_ABS / ABS_Y                  3547 (+8)
    - [  2, 300309,   3,  24,      70] # EV_ABS / ABS_PRESSURE             70 (-14)
    - [  2, 300309,   0,   0,       0] # ------------ SYN_REPORT (0) ---------- +49ms

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-31 10:40:49 +00:00
Peter Hutterer
2059a015ae tools: fix typo in debug-events man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-31 17:28:15 +10:00
Peter Hutterer
5e25bdfb03 timer: make the timer offset error a bit more user-friendly
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-31 13:03:00 +10:00
Peter Hutterer
da9eace8db tools: record: fix broken event time stamp recording
event->time ended up being an uninitialized field. Introduced in 5dc1a7e, the
event here isn't a struct input event but rather our internal event struct.
Fix this and reshuffle the time handling a bit so it's a bit more obvious
here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-30 02:10:33 +00:00
Peter Hutterer
fb1f0a6886 tools: record: wrap the time offset handling into a helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-30 02:10:33 +00:00
Peter Hutterer
8e35a2f949 tools: refuse to replay recordings with timestamps from the future
This indicates a bug in libinput record, might as well complain about it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-30 02:10:33 +00:00
Peter Hutterer
acfec31103 tools: align the tool type names on proximity nicely
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-30 02:10:33 +00:00
Jacob Kauffmann
aa3001668a doc/user: Fix grammar.
Signed-off-by: Jacob Kauffmann <jacob@system76.com>
2020-01-30 00:52:33 +00:00
Peter Hutterer
eb6ef9fe70 touchpad: correct a wrong slot count by the kernel
alps.c hardcodes 5 slots in the kernel but some devices only provide 2 slots
plus BTN_TOOL_TRIPLETAP, etc. Fix this by counting active slots and when the
fake finger count exceeds the active slots but is still less than the number
of slots, adjust the slots themselves downwards.

And because the new test device messes with our slot count assumptions for the
various tests hardcode that one device to return 2 slots.

Fixes #408

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-29 15:58:49 +10:00
Peter Hutterer
56f1ac2b72 test: make the custom touch override methods filter-able
Let those functions return true if they handled the event or false where they
didn't. This makes it more flexible to override touches in special cases only
and fall back to the normal litest handling otherwise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-29 15:58:49 +10:00
Peter Hutterer
8fdeba9ea2 test: wrap slot counting into a helper function
This is prep work for future devices that announce a wrong slot count. For the
tests this can be a problem if we rely on the correct slot count to decided
whether to run a test or not.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-29 15:58:49 +10:00
William Brown
63ac196def Improve git commit section
It wasn't clear about the Signed-of-by requirements, so this has been
improved with an example, and clarifies that it is a requirement, not
optional.

Signed-off-by: William Brown <william@blackhats.net.au>
2020-01-29 13:32:55 +10:00
William Brown
e5a6200a8e Small improvements to contributing for accessibility.
This makes a small number of changes that can help improve onboarding
and diversity of contributors. Key to point out is that the code of
conduct is now one of the first items, to highlight the community
standards (rather than being at the bottom where it can be
overlooked). The use of the work "hack" often is off putting to
many people, so replaced with "work". Additionally, changed
the introduction to highlight a desire to be inclusive.

A follow up you probably could do, is have a "how to prepare the
development environment" aka "what depenedencies do I need for
my distro to build the project.

Much of this has come from experience working with outreach/diversity
experts, and my own experience on

http://www.port389.org/docs/389ds/contributing.html

Signed-off-by: William Brown <william@blackhats.net.au>
2020-01-29 13:21:02 +10:00
Peter Hutterer
78e22d5910 doc/user: explain the gitlab issue tags
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-21 11:47:42 +10:00
Peter Hutterer
63169c8252 doc/user: some minor improvements
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-21 11:47:42 +10:00
A. Wilcox
ab377baa12 evdev-fallback: Use input_event_init for fallback
Old-style field initialisation ignores the 64-bit time_t change in
Linux UAPI, which causes the structure to be incompletely initialised
on 32-bit systems with the 64-bit time_t kernel headers.

This patch uses the input_event_init helper from the original 64-bit
time_t enablement patch.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Fixes: 5dc1a7ebd ("Adjust for 64bit time_t for 32bit architectures")
See-Also: libinput/libinput!346
2020-01-20 03:37:57 +00:00
Peter Hutterer
2fe672ecee gitlab CI: retry the VM jobs on script failure
Unfortunately the various VM jobs are timing sensitive and create a bunch of
false positives if the runners are under load and miss out on some of the
events (the tablet proximity handling is a particularly bad test here).
Let's retry on failure first to give the CI more opportunity to maybe succeed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-20 11:25:22 +10:00
Peter Hutterer
2d77260ba5 doc/user: expand the contributing document and make it top-level
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-20 09:14:44 +10:00
Peter Hutterer
ce8b256f91 tools: fix abort caused by the pointing stick integration quirk
See #400

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-15 14:12:12 +10:00
Peter Hutterer
9149c09a3b test: switch from counting slot max to num_slots
Much more human-readable this way

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-09 05:58:53 +00:00
Peter Hutterer
b4fa301d1f test: simplify a slot count check
Smaller than 3 and greater or equal to 4 means - well, anything that's not 3.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-09 05:58:53 +00:00
Peter Hutterer
62df51789b test: fix some wrong touchpad slot range checks
This was excluding tests from some touchpads due to slot count confusion.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-09 05:58:53 +00:00
Michael Forney
25a940a549 litest: Fix warnings about discarded qualifiers with check-0.13.0
check 0.13.0 introduced a new struct type TTest for test functions
instead of just a function. However, now the tcase_add_* functions use
`const Ttest *`, and since litest stores the test case in a `void *`,
we get warnings like the following:

../test/test-touchpad.c:7079:30: warning: passing argument 3 of '_litest_add' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  litest_add("touchpad:fuzz", touchpad_fuzz, LITEST_TOUCHPAD, LITEST_ANY);

To fix this, use `const void *`, which is compatible with both APIs.

Signed-off-by: Michael Forney <mforney@mforney.org>
2020-01-03 18:31:33 -08:00
Peter Hutterer
4d15fdf3e8 libinput 1.15.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-03 16:44:03 +10:00
Peter Hutterer
148b147173 test: indentation fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-03 16:44:03 +10:00
Peter Hutterer
bfc4980754 test: add the test cases to the suite in the utils tests
oops...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-03 16:44:03 +10:00
Peter Hutterer
5c04bc1851 doc/user: fix some HTML formatting
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-02 22:30:22 +00:00
Björn Daase
b80413f2d5 quirks: fix horizontal scrolling for Logitech MX Master 2S on bluetooth
It turns out that the MX Master 2S also has a different PID when connected
via bluetooth, causing horizontal scrolling to not work properly. Fix this,
by also adding it with the blueetooth PID (according to
https://github.com/libratbag/libratbag/blob/master/data/devices/logitech-MX-Master-2S.device
and in line with local testing) to the quirks file.

Signed-off-by: Björn Daase <bjoern@daase.net>
2019-12-26 11:09:00 +01:00
Peter Hutterer
565f9470ff meson.build: re-add missing trailing slash to the HTTP link
Got lost in 61f81ec93e

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-23 10:57:53 +10:00