Commit graph

4133 commits

Author SHA1 Message Date
Peter Hutterer
cd574ed5ef touchpad: add a note to the synaptics touch restore feature
We have code in place to handle the quirky transition from two to three
fingers (where one slot ends and another one starts). We do not handle the
same issue when transitioning from three to two fingers.

This is a note only because it hasn't mattered so far, at least until
eb6ef9fe70 from #408. And it doesn't matter anymore now either
because that code is now only called for ALPS devices.

https://gitlab.freedesktop.org/libinput/libinput/issues/434#note_419912

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-05 16:35:53 +10:00
Peter Hutterer
7b94955634 test: fix a coverity complaint
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-02 12:51:15 +10:00
Peter Hutterer
f657d83428 gitlab CI: drop the distribution "flavor" in favor of using the name
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-26 13:56:00 +10:00
Peter Hutterer
ebfb1e770e gitlab CI: split the task to run on a VM out from the host system
No functional changes here, it just makes the actual task more generic

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-26 13:56:00 +10:00
Peter Hutterer
dd8dcaaa94 gitlab CI: drop the distro name from the VM jobs
This changes rarely and it doesn't carry a lot of information anyway, at least
compared to the jobs that are specifically designed to build on various
distributions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-26 13:56:00 +10:00
Peter Hutterer
5eb53418b3 gitlab CI: update to latest ci-templates
Removes the special distro "flavor" handling for arch and it gives us nicer
warnings for VM failures.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 19:46:05 +10:00
Peter Hutterer
712eb10aad gitlab CI: run the kvm test suite without libwacom
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 06:45:01 +00:00
Peter Hutterer
6d173f890a test: disable a bunch of tests relying on libwacom
Some of these may have a non-libwacom solution but let's be honest, you
shouldn't be skipping libwacom if you rely on tablets to be precise.

Fixes #436

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 06:45:01 +00:00
Peter Hutterer
200fd44439 gitlab CI: pass the MESON_ARGS through to the VM as well
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 06:45:01 +00:00
Peter Hutterer
8e2a107d07 gitlab CI: mark the template file as yaml file for vim
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 06:45:01 +00:00
Peter Hutterer
dafb68f306 gitlab CI: don't run meson test on the scan-build job
Unfortunate side-effect of this: scan-build would store the logs in the build
dir, only for them to be immediately wiped by meson test. And that never
generated the scan-build warnings.

So this job was complaining about (minor) issues for a while, they just never
made it to the GUI as CI failures.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 01:53:21 +00:00
Peter Hutterer
20cf83789d tools: constify the optarg handling of seats
This shuts up scan-build complaining about memory leaks in libinput
debug-events (needs the right combination of --device option and eventually
triggering usage()) and saves us a bunch of unnecessary allocations.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 01:53:21 +00:00
Peter Hutterer
2bfbdfaf6b test: remove double-assignment to a variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 01:53:21 +00:00
Peter Hutterer
6a604d7c2f gitlab CI: don't push to wayland web on scheduled jobs
We have a set of scheduled jobs to rebuild images and clean out old
containers, but since they're largely unsupervised (i.e. not in response to a
MR) we don't want to update the official documentation - just in case
something goes wrong.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 00:56:38 +00:00
Peter Hutterer
44988f411b tools: replay: mkdir /etc/libinput if it doesn't exist yet
Where we're replaying a device with quirks, those quirks will be placed into
/etc/libinput/local-overrides.quirks. For that to work, /etc/libinput needs to
exist so let's make it where required.

https://bugzilla.redhat.com/show_bug.cgi?id=1806322

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-24 09:59:31 +10:00
Peter Hutterer
294298880d tools: record: fix fallback os-release file handling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-21 11:42:01 +10:00
Peter Hutterer
b2cda3f4b7 gitlab CI: rename the custom build jobs
The distro we're running on is a side-effect, it's more important to see the
bit that describes what the job actually does.

And while we're there, shuffle the hierarchy a bit for less duplication.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 13:39:32 +10:00
Peter Hutterer
50d916467b gitlab CI: use a separate variable for the template list
Just because I feel more comfortable with having this code in python than in
the templates.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 13:39:32 +10:00
Peter Hutterer
3a7412a4d7 gitlab CI: don't hard-code the arch/alpine versions
We only have one each and they're not really versions anyway but now that it
is all generated through templates, let's be consistent with the rest of the
CI script.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 13:39:32 +10:00
Peter Hutterer
02f5da42b2 gitlab CI: generate the various default-builds through templating
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 13:39:32 +10:00
Peter Hutterer
90888ab9f2 gitlab CI: generate the VM tests through the templates as well
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 13:38:46 +10:00
Peter Hutterer
f5506d1f22 gitlab CI: generate the CI script from a template
All the distro-specific stuff is the same template anyway, so let's generate
this (like we already do in libevdev and the ci-templates).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 13:38:39 +10:00
Peter Hutterer
acc60b9fb0 gitlab CI: add a comment to explain one of the jobs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 11:36:23 +10:00
Peter Hutterer
a2f354bb48 gitlab CI: whitespace fixes for better visual alignments
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 11:26:06 +10:00
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