platform/upstream/libinput.git
4 years agocompletion: add libinput analyze to zsh completions
Peter Hutterer [Mon, 23 Mar 2020 06:54:02 +0000 (16:54 +1000)]
completion: add libinput analyze to zsh completions

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agodoc/user: add a mini-blurb for the new libinput analyze tool
Peter Hutterer [Mon, 23 Mar 2020 06:48:31 +0000 (16:48 +1000)]
doc/user: add a mini-blurb for the new libinput analyze tool

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: generate the jobs for the custom builds from the config.yaml
Peter Hutterer [Sun, 22 Mar 2020 02:27:51 +0000 (12:27 +1000)]
gitlab CI: generate the jobs for the custom builds from the config.yaml

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: autogenerate the qemu tests for the last version of a distribution
Peter Hutterer [Sun, 22 Mar 2020 02:17:29 +0000 (12:17 +1000)]
gitlab CI: autogenerate the qemu tests for the last version of a distribution

Where want_qemu is set for a distribution, we generate the qemu tests for that
distribution for its last version listed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: invert the ci-templates check
Peter Hutterer [Sun, 22 Mar 2020 01:51:01 +0000 (11:51 +1000)]
gitlab CI: invert the ci-templates check

This makes the config file simpler, use a variable that is default false but
true where we need it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: switch the 'needs' tags to a dashed list
Peter Hutterer [Sun, 22 Mar 2020 01:40:38 +0000 (11:40 +1000)]
gitlab CI: switch the 'needs' tags to a dashed list

We don't use the [...] style list elsewhere, so let's not do this here either.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: update the various build tests to F32
Peter Hutterer [Sun, 22 Mar 2020 01:31:03 +0000 (11:31 +1000)]
gitlab CI: update the various build tests to F32

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab issue templates: remove the checkmarks
Peter Hutterer [Sun, 22 Mar 2020 22:29:13 +0000 (08:29 +1000)]
gitlab issue templates: remove the checkmarks

They show up like a task list in the issue tracker and that's not useful.

Likewise, make the "attach this" more prominent by no longer making it a
comment.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoadd trust mouse quirk #455
Martin Cihlář [Sun, 22 Mar 2020 11:07:51 +0000 (12:07 +0100)]
add trust mouse quirk #455

Signed-off-by: Martin Cihlář <martin.cibule@seznam.cz>
4 years agomeson.build: bump to 1.15.900
Peter Hutterer [Sun, 22 Mar 2020 00:51:01 +0000 (10:51 +1000)]
meson.build: bump to 1.15.900

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: fix a scan-build warning (value set but not read)
Peter Hutterer [Sun, 22 Mar 2020 00:44:17 +0000 (10:44 +1000)]
test: fix a scan-build warning (value set but not read)

This test pre-dates litest_assert_empty_queue(), so let's just use that

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoutil: fix a scan-build warning (value set but not read)
Peter Hutterer [Sun, 22 Mar 2020 00:43:52 +0000 (10:43 +1000)]
util: fix a scan-build warning (value set but not read)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoevdev: print a human time for ratelimit tests
Peter Hutterer [Sun, 22 Mar 2020 00:31:44 +0000 (10:31 +1000)]
evdev: print a human time for ratelimit tests

No point in printing an interval of e.g. 2h as milliseconds, let's convert
this to something human-readable.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agodoc: update the jumping cursor docs
Peter Hutterer [Sat, 21 Mar 2020 11:09:50 +0000 (21:09 +1000)]
doc: update the jumping cursor docs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: ratelimit the touch jump tests
Peter Hutterer [Sat, 21 Mar 2020 11:03:32 +0000 (21:03 +1000)]
touchpad: ratelimit the touch jump tests

In most cases these days touch jumps aren't actually fixable, they don't have
any good heuristics we can employ to remove them. And, luckily, in most cases
it doesn't matter because the users only notice the issue because of the error
message. To avoid spamming the user's log, let's ratelimit it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agopad: fix a compiler warning
Peter Hutterer [Sat, 21 Mar 2020 11:13:14 +0000 (21:13 +1000)]
pad: fix a compiler warning

gcc 10 isn't happy with the implicit enum conversion

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agodoc/api: remove invalid doxygen option
Peter Hutterer [Sat, 21 Mar 2020 11:21:09 +0000 (21:21 +1000)]
doc/api: remove invalid doxygen option

doxygen 1.8.17 shows this error:

error: Illegal format for option FILTER_PATTERNS, no equal sign ('=') specified for item '*.h'
error: Illegal format for option FILTER_PATTERNS, no equal sign ('=') specified for item '*.dox'

This was added in deadbf35c41 but I cannot figure out how this ever had any
effect based on the documentation for it. So let's drop it, I don't think it
has any effect anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: drop quotes from os-release information
Peter Hutterer [Fri, 20 Mar 2020 08:38:55 +0000 (18:38 +1000)]
tools: record: drop quotes from os-release information

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: if pytest fails to import, skip the tool option parsing test
Peter Hutterer [Fri, 20 Mar 2020 06:16:48 +0000 (16:16 +1000)]
tools: if pytest fails to import, skip the tool option parsing test

It's not the most important test outside of my machine and CI, so let's just
skip over it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
4 years agoman: install the analyze per-slot-delta man page
Peter Hutterer [Fri, 20 Mar 2020 06:09:28 +0000 (16:09 +1000)]
man: install the analyze per-slot-delta man page

And add libinput analyze to the main libinput man page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoci: move the ci template to the expected file for ci-fairy
Benjamin Tissoires [Wed, 18 Mar 2020 11:18:43 +0000 (12:18 +0100)]
ci: move the ci template to the expected file for ci-fairy

this makes the command to type much easier

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
4 years agoci: use ci-fairy to generate the template, not a custom script
Benjamin Tissoires [Wed, 18 Mar 2020 11:14:41 +0000 (12:14 +0100)]
ci: use ci-fairy to generate the template, not a custom script

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
4 years agoci: use the ci fairy to delete unwanted tags
Benjamin Tissoires [Wed, 18 Mar 2020 09:11:49 +0000 (10:11 +0100)]
ci: use the ci fairy to delete unwanted tags

here is some magic dust from https://gitlab.freedesktop.org/libevdev/libevdev/-/merge_requests/49/diffs?commit_id=325839e6401d322ed632bf30e2e0255785bb31f6#7bc093350962b0f3fe1e612f06beaba806ee061f_219_217

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
4 years agoci: use latest templates, and API
Benjamin Tissoires [Tue, 17 Mar 2020 10:23:50 +0000 (11:23 +0100)]
ci: use latest templates, and API

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
4 years agotools: switch tool option parsing test to use pytest
Peter Hutterer [Mon, 16 Mar 2020 03:13:41 +0000 (13:13 +1000)]
tools: switch tool option parsing test to use pytest

pytest is more powerful than unittest, so let's switch to that instead. And in
the process fix a few tests that for some reason succeeded even though they
shouldn't have (e.g. the autorestart test).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: use the right exit code when the output file is missing
Peter Hutterer [Mon, 16 Mar 2020 06:13:27 +0000 (16:13 +1000)]
tools: record: use the right exit code when the output file is missing

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: allow for an output file without --o
Peter Hutterer [Mon, 16 Mar 2020 01:23:33 +0000 (11:23 +1000)]
tools: record: allow for an output file without --o

  libinput record touchpad.yml /dev/input/eventX
or just
  libinput record touchpad.yml
are simpler invocations and since we're quite limited in what we can record
(i.e. only device files) we can just check the argument list to figure out
whether there is something to record to.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab: revamp the bug template a bit
Peter Hutterer [Sun, 15 Mar 2020 22:59:35 +0000 (08:59 +1000)]
gitlab: revamp the bug template a bit

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: add a libinput analyze command with the per-slot-delta subcommand
Peter Hutterer [Thu, 12 Mar 2020 01:53:22 +0000 (11:53 +1000)]
tools: add a libinput analyze command with the per-slot-delta subcommand

I've been using this script ever since libinput record was available, might as
well ship it with libinput so I don't have to remember where it lives.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: fix a typo in a man page
Peter Hutterer [Thu, 12 Mar 2020 01:02:57 +0000 (11:02 +1000)]
tools: fix a typo in a man page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: fix dmi recording
Peter Hutterer [Mon, 9 Mar 2020 00:16:04 +0000 (10:16 +1000)]
tools: record: fix dmi recording

Processing os-release in the same buffer that the dmi modalias used caused the
dmi to be recorded as 'dmi: "VERSION_ID=31"'. The cause for that was simply
that the dmi modalias was read but not printed until after the os-release
information was processed.

Fix this two-fold: rearrange that each part now reads and prints in
one go, and rename the buffers so we don't re-use them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agolibinput 1.15.3 1.15.3
Peter Hutterer [Fri, 6 Mar 2020 03:23:38 +0000 (13:23 +1000)]
libinput 1.15.3

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: only reduce the slot count for ALPS serial touchpads
Peter Hutterer [Thu, 27 Feb 2020 04:48:28 +0000 (14:48 +1000)]
touchpad: only reduce the slot count for ALPS serial touchpads

We're getting too many regressions on other devices for this feature and only
ALPS touchpads need it (it's a kernel driver bug). So let's limit this to
those devices only.

For example, synaptics serial touchpads don't keep the fake fingers and slot
states in sync when going from two to three fingers, causing an erroneous slot
downgrade. See
https://gitlab.freedesktop.org/libinput/libinput/issues/434#note_419912
That interferes with this code but fixing it is hard and anyway,
synaptics touchpads don't need the slot count drop.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoquirks: rename the alps touchpad quirk to note it's a serial TP quirk
Peter Hutterer [Thu, 27 Feb 2020 05:27:46 +0000 (15:27 +1000)]
quirks: rename the alps touchpad quirk to note it's a serial TP quirk

This quirk only applies to serial ALPS touchpads, so let's name it
accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: add a note to the synaptics touch restore feature
Peter Hutterer [Thu, 27 Feb 2020 04:46:10 +0000 (14:46 +1000)]
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
eb6ef9fe70635e7c91e 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>
4 years agotest: fix a coverity complaint
Peter Hutterer [Mon, 2 Mar 2020 02:51:15 +0000 (12:51 +1000)]
test: fix a coverity complaint

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: drop the distribution "flavor" in favor of using the name
Peter Hutterer [Wed, 26 Feb 2020 03:23:09 +0000 (13:23 +1000)]
gitlab CI: drop the distribution "flavor" in favor of using the name

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: split the task to run on a VM out from the host system
Peter Hutterer [Tue, 25 Feb 2020 23:56:50 +0000 (09:56 +1000)]
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>
4 years agogitlab CI: drop the distro name from the VM jobs
Peter Hutterer [Tue, 25 Feb 2020 23:49:53 +0000 (09:49 +1000)]
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>
4 years agogitlab CI: update to latest ci-templates
Peter Hutterer [Mon, 24 Feb 2020 09:09:15 +0000 (19:09 +1000)]
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>
4 years agogitlab CI: run the kvm test suite without libwacom
Peter Hutterer [Mon, 24 Feb 2020 04:29:10 +0000 (14:29 +1000)]
gitlab CI: run the kvm test suite without libwacom

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: disable a bunch of tests relying on libwacom
Peter Hutterer [Mon, 24 Feb 2020 05:57:05 +0000 (15:57 +1000)]
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>
4 years agogitlab CI: pass the MESON_ARGS through to the VM as well
Peter Hutterer [Mon, 24 Feb 2020 05:09:11 +0000 (15:09 +1000)]
gitlab CI: pass the MESON_ARGS through to the VM as well

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: mark the template file as yaml file for vim
Peter Hutterer [Mon, 24 Feb 2020 04:25:58 +0000 (14:25 +1000)]
gitlab CI: mark the template file as yaml file for vim

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: don't run meson test on the scan-build job
Peter Hutterer [Fri, 21 Feb 2020 00:37:56 +0000 (10:37 +1000)]
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>
4 years agotools: constify the optarg handling of seats
Peter Hutterer [Fri, 21 Feb 2020 00:28:56 +0000 (10:28 +1000)]
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>
4 years agotest: remove double-assignment to a variable
Peter Hutterer [Thu, 20 Feb 2020 08:15:19 +0000 (18:15 +1000)]
test: remove double-assignment to a variable

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: don't push to wayland web on scheduled jobs
Peter Hutterer [Thu, 20 Feb 2020 23:44:22 +0000 (09:44 +1000)]
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>
4 years agotools: replay: mkdir /etc/libinput if it doesn't exist yet
Peter Hutterer [Sun, 23 Feb 2020 23:58:24 +0000 (09:58 +1000)]
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>
4 years agotools: record: fix fallback os-release file handling
Peter Hutterer [Fri, 21 Feb 2020 01:41:19 +0000 (11:41 +1000)]
tools: record: fix fallback os-release file handling

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: rename the custom build jobs
Peter Hutterer [Thu, 20 Feb 2020 03:31:33 +0000 (13:31 +1000)]
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>
4 years agogitlab CI: use a separate variable for the template list
Peter Hutterer [Thu, 20 Feb 2020 03:25:40 +0000 (13:25 +1000)]
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>
4 years agogitlab CI: don't hard-code the arch/alpine versions
Peter Hutterer [Thu, 20 Feb 2020 03:20:53 +0000 (13:20 +1000)]
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>
4 years agogitlab CI: generate the various default-builds through templating
Peter Hutterer [Thu, 20 Feb 2020 02:48:16 +0000 (12:48 +1000)]
gitlab CI: generate the various default-builds through templating

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: generate the VM tests through the templates as well
Peter Hutterer [Thu, 20 Feb 2020 02:08:48 +0000 (12:08 +1000)]
gitlab CI: generate the VM tests through the templates as well

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: generate the CI script from a template
Peter Hutterer [Thu, 20 Feb 2020 01:57:44 +0000 (11:57 +1000)]
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>
4 years agogitlab CI: add a comment to explain one of the jobs
Peter Hutterer [Thu, 20 Feb 2020 01:36:23 +0000 (11:36 +1000)]
gitlab CI: add a comment to explain one of the jobs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: whitespace fixes for better visual alignments
Peter Hutterer [Thu, 20 Feb 2020 01:22:32 +0000 (11:22 +1000)]
gitlab CI: whitespace fixes for better visual alignments

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agolibinput 1.15.2 1.15.2
Peter Hutterer [Thu, 20 Feb 2020 01:21:16 +0000 (11:21 +1000)]
libinput 1.15.2

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: record basic os-release information as well
Peter Hutterer [Tue, 18 Feb 2020 07:35:58 +0000 (17:35 +1000)]
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>
4 years agotools: record: rename a variable to just buf
Peter Hutterer [Tue, 18 Feb 2020 07:29:28 +0000 (17:29 +1000)]
tools: record: rename a variable to just buf

Better name for re-use

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: handling killing the qemu process better
Peter Hutterer [Tue, 18 Feb 2020 22:42:15 +0000 (08:42 +1000)]
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>
4 years agogitlab CI: print a warning when our VM startup fails
Peter Hutterer [Tue, 18 Feb 2020 23:26:59 +0000 (09:26 +1000)]
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>
4 years agotouchpad: sync the initial tracking id state to the touchpad
Peter Hutterer [Tue, 18 Feb 2020 06:48:09 +0000 (16:48 +1000)]
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 eb6ef9fe70635e7c91e8bb860b5a282f4cd3f91e

Fixes #429

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: never reduce the slot count to 0
Peter Hutterer [Fri, 14 Feb 2020 06:20:32 +0000 (16:20 +1000)]
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>
4 years agoquirks: Add quirk for MadCatz RAT7 mouse
Victor Brekenfeld [Sat, 15 Feb 2020 19:15:41 +0000 (20:15 +0100)]
quirks: Add quirk for MadCatz RAT7 mouse

Signed-off-by: Victor Brekenfeld <github@drakulix.de>
4 years agotablet: don't force a proximity out while buttons are down
Peter Hutterer [Thu, 6 Feb 2020 09:09:14 +0000 (19:09 +1000)]
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>
4 years agotest: drop a wait in favor of direct event processing
Peter Hutterer [Thu, 6 Feb 2020 09:05:20 +0000 (19:05 +1000)]
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>
4 years agotest: fix a duplicate button down where we want a button press + release
Peter Hutterer [Thu, 6 Feb 2020 09:04:38 +0000 (19:04 +1000)]
test: fix a duplicate button down where we want a button press + release

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: mark the tablets that require forced prox out as such
Peter Hutterer [Thu, 6 Feb 2020 08:51:09 +0000 (18:51 +1000)]
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>
4 years agotest: add a test case for checking EVDEV_ABS overrides
Peter Hutterer [Wed, 12 Feb 2020 08:04:41 +0000 (18:04 +1000)]
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>
4 years agotest: drop the #define for the litest device rules
Peter Hutterer [Wed, 12 Feb 2020 07:03:31 +0000 (17:03 +1000)]
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>
4 years agoudev: directly import the device groups
Peter Hutterer [Wed, 12 Feb 2020 06:51:29 +0000 (16:51 +1000)]
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>
4 years agoudev: *add* the fuzz-to-zero program to the udev RUN list, don't overwrite
Peter Hutterer [Tue, 11 Feb 2020 21:13:02 +0000 (07:13 +1000)]
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>
4 years agotools: record: record the EVDEV_ABS properties correctly
Peter Hutterer [Fri, 7 Feb 2020 06:17:30 +0000 (16:17 +1000)]
tools: record: record the EVDEV_ABS properties correctly

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agolibinput 1.15.1 1.15.1
Peter Hutterer [Mon, 3 Feb 2020 04:28:44 +0000 (14:28 +1000)]
libinput 1.15.1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotablet: fix the handling of axis updates after a forced proximity out
Peter Hutterer [Fri, 31 Jan 2020 02:12:59 +0000 (12:12 +1000)]
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>
4 years agotest: add helper functions for checking proximity events
Peter Hutterer [Fri, 31 Jan 2020 02:23:53 +0000 (12:23 +1000)]
test: add helper functions for checking proximity events

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: add a comment to a test device
Peter Hutterer [Fri, 31 Jan 2020 02:23:24 +0000 (12:23 +1000)]
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>
4 years agotools: record: record the EV_ABS deltas along with the absolute value
Peter Hutterer [Fri, 31 Jan 2020 08:03:01 +0000 (18:03 +1000)]
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>
4 years agotools: fix typo in debug-events man page
Peter Hutterer [Thu, 5 Dec 2019 05:11:03 +0000 (15:11 +1000)]
tools: fix typo in debug-events man page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotimer: make the timer offset error a bit more user-friendly
Peter Hutterer [Fri, 31 Jan 2020 02:23:01 +0000 (12:23 +1000)]
timer: make the timer offset error a bit more user-friendly

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: record: fix broken event time stamp recording
Peter Hutterer [Thu, 30 Jan 2020 00:49:06 +0000 (10:49 +1000)]
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>
4 years agotools: record: wrap the time offset handling into a helper function
Peter Hutterer [Thu, 30 Jan 2020 00:24:59 +0000 (10:24 +1000)]
tools: record: wrap the time offset handling into a helper function

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: refuse to replay recordings with timestamps from the future
Peter Hutterer [Wed, 29 Jan 2020 23:47:51 +0000 (09:47 +1000)]
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>
4 years agotools: align the tool type names on proximity nicely
Peter Hutterer [Wed, 29 Jan 2020 23:45:37 +0000 (09:45 +1000)]
tools: align the tool type names on proximity nicely

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agodoc/user: Fix grammar.
Jacob Kauffmann [Mon, 27 Jan 2020 21:49:25 +0000 (21:49 +0000)]
doc/user: Fix grammar.

Signed-off-by: Jacob Kauffmann <jacob@system76.com>
4 years agotouchpad: correct a wrong slot count by the kernel
Peter Hutterer [Thu, 9 Jan 2020 00:10:31 +0000 (10:10 +1000)]
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>
4 years agotest: make the custom touch override methods filter-able
Peter Hutterer [Wed, 8 Jan 2020 23:48:29 +0000 (09:48 +1000)]
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>
4 years agotest: wrap slot counting into a helper function
Peter Hutterer [Thu, 9 Jan 2020 01:13:18 +0000 (11:13 +1000)]
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>
4 years agoImprove git commit section
William Brown [Wed, 29 Jan 2020 03:32:03 +0000 (13:32 +1000)]
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>
4 years agoSmall improvements to contributing for accessibility.
William Brown [Wed, 29 Jan 2020 02:40:39 +0000 (12:40 +1000)]
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>
4 years agodoc/user: explain the gitlab issue tags
Peter Hutterer [Tue, 21 Jan 2020 01:45:25 +0000 (11:45 +1000)]
doc/user: explain the gitlab issue tags

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agodoc/user: some minor improvements
Peter Hutterer [Tue, 21 Jan 2020 01:45:10 +0000 (11:45 +1000)]
doc/user: some minor improvements

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoevdev-fallback: Use input_event_init for fallback
A. Wilcox [Sun, 19 Jan 2020 22:01:57 +0000 (16:01 -0600)]
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

4 years agogitlab CI: retry the VM jobs on script failure
Peter Hutterer [Mon, 20 Jan 2020 01:25:22 +0000 (11:25 +1000)]
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>
4 years agodoc/user: expand the contributing document and make it top-level
Peter Hutterer [Sun, 19 Jan 2020 23:14:44 +0000 (09:14 +1000)]
doc/user: expand the contributing document and make it top-level

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: fix abort caused by the pointing stick integration quirk
Peter Hutterer [Wed, 15 Jan 2020 04:09:50 +0000 (14:09 +1000)]
tools: fix abort caused by the pointing stick integration quirk

See #400

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: switch from counting slot max to num_slots
Peter Hutterer [Thu, 9 Jan 2020 01:51:55 +0000 (11:51 +1000)]
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>
4 years agotest: simplify a slot count check
Peter Hutterer [Thu, 9 Jan 2020 02:22:11 +0000 (12:22 +1000)]
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>