platform/upstream/libinput.git
6 years agotest: add --gen-suppressions=all to the valgrind run
Peter Hutterer [Mon, 23 Jul 2018 03:59:39 +0000 (13:59 +1000)]
test: add --gen-suppressions=all to the valgrind run

Because if we have a heisenbug that can't be reproduced on other machines,
having the suppression output in the log can save a lot of time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoImprove HP Chromebook 14 pressure ranges
Jeremy [Sun, 22 Jul 2018 21:16:36 +0000 (23:16 +0200)]
Improve HP Chromebook 14 pressure ranges

6 years agoMerge branch 'master' of gitlab.freedesktop.org:libinput/libinput
Peter Hutterer [Thu, 19 Jul 2018 22:37:47 +0000 (08:37 +1000)]
Merge branch 'master' of gitlab.freedesktop.org:libinput/libinput

6 years agoAdd versionsort test
Greg V [Wed, 18 Jul 2018 18:37:25 +0000 (21:37 +0300)]
Add versionsort test

And make local versionsort testable even when the native one is present.

6 years agotools: fix touch frame checks in the YAML verifier script
Peter Hutterer [Thu, 19 Jul 2018 05:34:25 +0000 (15:34 +1000)]
tools: fix touch frame checks in the YAML verifier script

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotouchpad: don't NONE or HOVERING touches towards the touch
Peter Hutterer [Thu, 19 Jul 2018 04:52:44 +0000 (14:52 +1000)]
touchpad: don't NONE or HOVERING touches towards the touch

To trigger this, we'd need 1, 2, 3 fingers down, release fingers 1 and 2 but
keep 3 down. Then put finger 1 down again. Touches 1 and 3 are alive now,
touch 2 is in state NONE.

During the thumb detection we took the first touch not in BEGIN and assigned
it to "first" - this would now be the second touch in state NONE.

Real effect is relatively minimal since we only use the coordinates here.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/89

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: always set the log handler for debug-events and debug-gui
Peter Hutterer [Thu, 19 Jul 2018 04:10:32 +0000 (14:10 +1000)]
tools: always set the log handler for debug-events and debug-gui

This way errors are highlighted in red even without --verbose

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: add a section to the FAQs "is libinput required for Wayland"
Peter Hutterer [Thu, 19 Jul 2018 01:39:35 +0000 (11:39 +1000)]
doc: add a section to the FAQs "is libinput required for Wayland"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: move the "General" section to the "Developer" section
Peter Hutterer [Thu, 19 Jul 2018 01:20:54 +0000 (11:20 +1000)]
doc: move the "General" section to the "Developer" section

The info here is mostly developer-oriented, let's group this together.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: fix references to a trackpoint range in the FAQs
Peter Hutterer [Thu, 19 Jul 2018 01:12:27 +0000 (11:12 +1000)]
doc: fix references to a trackpoint range in the FAQs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoREADME: add a user documentation section fairly high up
Peter Hutterer [Thu, 19 Jul 2018 01:11:58 +0000 (11:11 +1000)]
README: add a user documentation section fairly high up

For those with a tldr attention span

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: break up the "what is libinput" page with two sections
Peter Hutterer [Thu, 19 Jul 2018 01:06:50 +0000 (11:06 +1000)]
doc: break up the "what is libinput" page with two sections

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoAdd FreeBSD (cross-compliation based) CI
Greg V [Mon, 16 Jul 2018 15:33:39 +0000 (18:33 +0300)]
Add FreeBSD (cross-compliation based) CI

Fixes #82

6 years agoAutodetect and use libepoll-shim on FreeBSD
Greg V [Sun, 15 Jul 2018 21:41:05 +0000 (00:41 +0300)]
Autodetect and use libepoll-shim on FreeBSD

6 years agoevdev: fix the trackpoint multiplier info message
Peter Hutterer [Tue, 17 Jul 2018 00:51:35 +0000 (10:51 +1000)]
evdev: fix the trackpoint multiplier info message

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: setenv the quirks dir when running from the build directory
Peter Hutterer [Tue, 17 Jul 2018 00:02:49 +0000 (10:02 +1000)]
tools: setenv the quirks dir when running from the build directory

Fixes #84

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: change prototype of the builddir lookup function
Peter Hutterer [Tue, 17 Jul 2018 00:12:16 +0000 (10:12 +1000)]
tools: change prototype of the builddir lookup function

Only one place really needs the return argument, so we might as well just pass
the memory to be returned in.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoAdd input.h for FreeBSD
Greg V [Sun, 15 Jul 2018 21:05:33 +0000 (00:05 +0300)]
Add input.h for FreeBSD

6 years agotest: ptrace compatibility with *BSD
Greg V [Tue, 10 Jul 2018 11:01:54 +0000 (14:01 +0300)]
test: ptrace compatibility with *BSD

6 years agotest: use simple portable sendfile
Greg V [Tue, 10 Jul 2018 10:57:12 +0000 (13:57 +0300)]
test: use simple portable sendfile

There's no need for high performance in these little tests, so instead of
supporting various platform-specific sendfile() implementations, just use a local read-write function.

6 years agotest: support disabling tty on FreeBSD
Greg V [Tue, 10 Jul 2018 10:47:54 +0000 (13:47 +0300)]
test: support disabling tty on FreeBSD

Instead of K_OFF, use K_RAW plus termios raw mode.
(Same approach as in the Weston patches)

6 years agoUse getprogname() when program_invocation_short_name is not defined
Greg V [Tue, 10 Jul 2018 11:00:11 +0000 (14:00 +0300)]
Use getprogname() when program_invocation_short_name is not defined

6 years agoFix include portablity (xlocale, stdlib)
Greg V [Tue, 10 Jul 2018 10:56:18 +0000 (13:56 +0300)]
Fix include portablity (xlocale, stdlib)

6 years agoImport versionsort implementation from musl for systems without versionsort
Greg V [Tue, 10 Jul 2018 10:49:26 +0000 (13:49 +0300)]
Import versionsort implementation from musl for systems without versionsort

versionsort is a GNU extension, not available on *BSD systems.

6 years agofallback: remove some if 0 code
Peter Hutterer [Fri, 13 Jul 2018 05:17:01 +0000 (15:17 +1000)]
fallback: remove some if 0 code

Looks like a development leftover.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoevdev: whitespace fix
Peter Hutterer [Fri, 13 Jul 2018 05:26:24 +0000 (15:26 +1000)]
evdev: whitespace fix

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: remove unsupported events from the invalid-range touchscreen test device
Peter Hutterer [Fri, 13 Jul 2018 05:03:39 +0000 (15:03 +1000)]
test: remove unsupported events from the invalid-range touchscreen test device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: remove unused values.h include
Greg V [Sun, 15 Jul 2018 20:50:33 +0000 (23:50 +0300)]
test: remove unused values.h include

6 years agoRename data/ to quirks/
Peter Hutterer [Fri, 13 Jul 2018 02:57:02 +0000 (12:57 +1000)]
Rename data/ to quirks/

A better, less ambiguous name than just "datadir"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodata: add HP Chromebook 14 pressure ranges
Peter Hutterer [Mon, 9 Jul 2018 03:51:39 +0000 (13:51 +1000)]
data: add HP Chromebook 14 pressure ranges

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/51

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotap: log a tap bug for release on MULTITAP_PALM
Peter Hutterer [Fri, 13 Jul 2018 01:08:56 +0000 (11:08 +1000)]
tap: log a tap bug for release on MULTITAP_PALM

If we get here, the finger may only triger a PALM_UP but not a RELEASE event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotap: remove unnecessary TAP_STATE_DEAD assignment
Peter Hutterer [Fri, 13 Jul 2018 00:55:44 +0000 (10:55 +1000)]
tap: remove unnecessary TAP_STATE_DEAD assignment

All palm touches are set to DEAD anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoMerge branch 'wip/trackpoint-acceleration'
Peter Hutterer [Thu, 12 Jul 2018 06:48:49 +0000 (16:48 +1000)]
Merge branch 'wip/trackpoint-acceleration'

6 years agoGitlab CI: use a space in the meson builddir
Peter Hutterer [Wed, 11 Jul 2018 23:07:55 +0000 (09:07 +1000)]
Gitlab CI: use a space in the meson builddir

Ideally this should catch any errors caused by reliance on unspaced
directories.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: move the meson.build in as subdir()
Peter Hutterer [Fri, 6 Jul 2018 00:47:18 +0000 (10:47 +1000)]
doc: move the meson.build in as subdir()

Doing so means we can ditch the specific input list for doxygen and just copy
all files over into our builddir/doc/ subdir, then use that subdirectory as
input data.

This relies on meson putting a subdir() into a subdirectory in the build
directory. This isn't technically guaranteed but I also suspect that if meson
ever changes that, lots of other projects will break. Even in that case we
should build just fine since we now filter for *.h and *.dox and don't copy
any other doxygen-commented files into the builddir anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: tidy up the symbols leak test
Peter Hutterer [Wed, 11 Jul 2018 22:42:53 +0000 (08:42 +1000)]
test: tidy up the symbols leak test

This hasn't been a real .in file since the autotools removal, so rename it to
reflect that. And since we can call it with arguments from meson, let's do so
in the most sensible manner - passing the full paths in as required rather
than relying on a directory layout within the script.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agomeson.build: move the directory path generation to a single section
Peter Hutterer [Wed, 11 Jul 2018 03:08:51 +0000 (13:08 +1000)]
meson.build: move the directory path generation to a single section

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodata: add the dell trackpoint multipliers
Peter Hutterer [Wed, 11 Jul 2018 06:34:57 +0000 (16:34 +1000)]
data: add the dell trackpoint multipliers

From systemd's hwdb/70-pointingstick.hwdb

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoquirks: append "Touchpad" to the various dell touchpad quirks
Peter Hutterer [Wed, 11 Jul 2018 06:34:22 +0000 (16:34 +1000)]
quirks: append "Touchpad" to the various dell touchpad quirks

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoquirks: remove the leftovers of the trackpoint range attribute
Peter Hutterer [Wed, 11 Jul 2018 05:04:25 +0000 (15:04 +1000)]
quirks: remove the leftovers of the trackpoint range attribute

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoquirks: remove the trackpoint range quirks entries
Peter Hutterer [Wed, 11 Jul 2018 05:01:18 +0000 (15:01 +1000)]
quirks: remove the trackpoint range quirks entries

The only trackpoint where I have a rough idea what we need is the ALPS v8 one.
All other ones we'll have to re-do.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agofilter: add a trackpoint multiplier factor
Peter Hutterer [Mon, 9 Jul 2018 06:04:50 +0000 (16:04 +1000)]
filter: add a trackpoint multiplier factor

Measuring the trackpoint range has not shown to be sufficient or precise
enough to be used as an ingredient for trackpoint acceleration. So let's just
switch back to a generic multiplier that we can apply to the input deltas do
undo any device-specific lack of scaling.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoquirks: add quirks_get_double()
Peter Hutterer [Mon, 9 Jul 2018 06:00:45 +0000 (16:00 +1000)]
quirks: add quirks_get_double()

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: make-ptraccel-graphs: drop an unnecessary outfile
Peter Hutterer [Fri, 29 Jun 2018 05:09:47 +0000 (15:09 +1000)]
tools: make-ptraccel-graphs: drop an unnecessary outfile

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: drop the special handling for trackpoint accel, not needed anymore
Peter Hutterer [Wed, 27 Jun 2018 05:54:55 +0000 (15:54 +1000)]
tools: drop the special handling for trackpoint accel, not needed anymore

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: reduce the trackpoint gnuplot range to 0..1 units/ms
Peter Hutterer [Fri, 29 Jun 2018 05:15:20 +0000 (15:15 +1000)]
tools: reduce the trackpoint gnuplot range to 0..1 units/ms

Anything above 1 unit/ms is high pressure. Though that depends on the
trackpoint range, so...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: fix units for trackpoint accel graph
Peter Hutterer [Wed, 27 Jun 2018 05:54:04 +0000 (15:54 +1000)]
tools: fix units for trackpoint accel graph

We use speed now and trackpoints are in units/ms

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agofilter: make the trackpoint accel profile func the same prototype as the others
Peter Hutterer [Wed, 27 Jun 2018 05:53:23 +0000 (15:53 +1000)]
filter: make the trackpoint accel profile func the same prototype as the others

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agofilter: replace the trackpoint accel with a velocity-based one
Peter Hutterer [Tue, 5 Jun 2018 04:54:50 +0000 (14:54 +1000)]
filter: replace the trackpoint accel with a velocity-based one

This gets rid of the trackpoint range propery that we've been parsing until
now and instead just opts for a basic curve with some deceleration for low
pressure. The speed range is taken from the touchpad and should be wide enough
for most trackpoints that fall within the expected range.

Trackpoints like the new ALPS ones need to be configured through a hwdb (this
part is currently missing).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: add a subsection on how to use libinput record --autorestart
Peter Hutterer [Tue, 10 Jul 2018 08:00:07 +0000 (18:00 +1000)]
doc: add a subsection on how to use libinput record --autorestart

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: libinput-measure is a section, not a subsection
Peter Hutterer [Tue, 10 Jul 2018 07:45:58 +0000 (17:45 +1000)]
doc: libinput-measure is a section, not a subsection

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: don't add the debug behavior for release builds
Peter Hutterer [Wed, 27 Jun 2018 04:24:54 +0000 (14:24 +1000)]
tools: don't add the debug behavior for release builds

When the meson build type is something other than the debug types, we don't
need the special behavior where we adjust executable paths and data dir
lookup for tools run directly from the builddir.

This avoids leaking the build dir into the final executables.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: fake-build the other tools the same way as measure touchpad-tap
Peter Hutterer [Wed, 27 Jun 2018 04:01:25 +0000 (14:01 +1000)]
tools: fake-build the other tools the same way as measure touchpad-tap

Doesn't actually do anything but this way they end up in the builddir and can
be picked up by ./builddir/libinput measure fuzz, etc.

And rename the source files to .py to signal that they are not supposed to be
directly executed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: rely on the libinput and quirks tool to pick the right directories
Peter Hutterer [Wed, 27 Jun 2018 03:44:18 +0000 (13:44 +1000)]
tools: rely on the libinput and quirks tool to pick the right directories

Don't use a custom hack here, just make sure the tool ends up in the builddir
so it's picked up by the libinput main tool.

This means the PATH isn't set up correctly when called directly
(./builddir/libinput-measure-touchpad-pressure) but the workaround is to
always use the libinput tool - just as we expect from users.

To make it more obvious that we're not supposed to run this directly, rename
the source file to .py

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: quirks: if we're executing from the builddir, use the git datadir
Peter Hutterer [Wed, 27 Jun 2018 03:36:52 +0000 (13:36 +1000)]
tools: quirks: if we're executing from the builddir, use the git datadir

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: if the execdir is the builddir, add it to the path
Peter Hutterer [Wed, 27 Jun 2018 03:26:51 +0000 (13:26 +1000)]
tools: if the execdir is the builddir, add it to the path

When running libinput tools from the builddir, look up the subtools in the
builddir as well. Otherwise, add the install prefix to the list of lookup
locations.

This ensures that a) we're running builddir stuff against builddir stuff, but
also b) that we're not running builddir stuff against installed stuff because
that may give us false positives.

The test was squashed in from a separate patch and was
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: drop the git version into the documentation
Peter Hutterer [Thu, 5 Jul 2018 02:17:26 +0000 (12:17 +1000)]
doc: drop the git version into the documentation

The libinput/doc/latest is now built automatically from git, so it's good to
have a reference to show which commit it was being built from. Add a section
to the readme with git commit information that is replaced by meson.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoSwitch to using files() for the doxygen input sources
Peter Hutterer [Thu, 5 Jul 2018 03:34:22 +0000 (13:34 +1000)]
Switch to using files() for the doxygen input sources

Using files() over a list of hand-constructed paths is the recommended way.
But unfortunately doxygen needs its input files as a string list, so we still
have to build that list anyway. Still, this way we don't need to hardcode
every file with the source root, we just assemble it as we go.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoGitLab CI: only rebuild the website when pushing to libinput proper
Peter Hutterer [Fri, 6 Jul 2018 00:12:32 +0000 (10:12 +1000)]
GitLab CI: only rebuild the website when pushing to libinput proper

We don't want to try build when someone pushes to <username>/libinput

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoGitlab CI: trigger the wayland web rebuild on pushes to master
Peter Hutterer [Thu, 5 Jul 2018 04:13:33 +0000 (14:13 +1000)]
Gitlab CI: trigger the wayland web rebuild on pushes to master

This requires that WAYLAND_WEB_TOKEN is set up in the libinput settings on
gitlab.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoGitLab CI: move the scan-build job up in the file
Peter Hutterer [Thu, 5 Jul 2018 23:35:53 +0000 (09:35 +1000)]
GitLab CI: move the scan-build job up in the file

This is by far the slowest job, move it up so it gets started earlier and we
have more parallelization going on.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: misc: up the time limit on the ratelimit tests
Peter Hutterer [Thu, 5 Jul 2018 03:55:21 +0000 (13:55 +1000)]
test: misc: up the time limit on the ratelimit tests

I keep hitting this in the gitlab runner, 100ms is clearly not enough here for
slow containers.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: add the switches page to a "other devices" category
Peter Hutterer [Thu, 5 Jul 2018 02:00:31 +0000 (12:00 +1000)]
doc: add the switches page to a "other devices" category

It felt a bit lost at the bottom of the "pages" list.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: build doxygen output into "Documentation"
Peter Hutterer [Tue, 3 Jul 2018 03:40:45 +0000 (13:40 +1000)]
doc: build doxygen output into "Documentation"

Slightly more obvious than just "html". Main motivation here is that we want
to provide the documentation as artifact from GitLab's CI, so having it unzip
to something slightly more meaningful makes sense.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoGitLab CI: rename MESON_PARAMS to MESON_ARGS
Peter Hutterer [Thu, 5 Jul 2018 00:28:56 +0000 (10:28 +1000)]
GitLab CI: rename MESON_PARAMS to MESON_ARGS

More correct, and we use NINJA_ARGS too

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoGitlab CI: run the tests through valgrind on the f28 box
Peter Hutterer [Wed, 4 Jul 2018 04:38:33 +0000 (14:38 +1000)]
Gitlab CI: run the tests through valgrind on the f28 box

We don't run it on all machines, valgrind fails right now on arch because of a
memleak in bash itself. To avoid having CI failures that aren't our fault,
only run on F28 because that's the one I'm tracking.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoGitLab CI: always run ninja test unless otherwise specified
Peter Hutterer [Tue, 3 Jul 2018 06:03:51 +0000 (16:03 +1000)]
GitLab CI: always run ninja test unless otherwise specified

Now that the test suite has been cleaned up to be useful even when we can't
run the main runner, let's always run ninja test. Except in the targets where
we want something different.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: rename list-quirks to the more generic "quirks list"
Peter Hutterer [Tue, 26 Jun 2018 03:15:13 +0000 (13:15 +1000)]
tools: rename list-quirks to the more generic "quirks list"

Enables us to easily add more tools where needed and it is
more consistent with the existing tools.

The commands are now:
   libinput quirks list
   libinput quirks validate

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/66

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoGitLab CI: don't use spaces in artifact names
Peter Hutterer [Tue, 3 Jul 2018 03:06:13 +0000 (13:06 +1000)]
GitLab CI: don't use spaces in artifact names

Apparently that doesn't work anymore

Related to https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/41

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agofallback: cancel the debounce timers during device remove, not destroy
Peter Hutterer [Fri, 29 Jun 2018 03:43:15 +0000 (13:43 +1000)]
fallback: cancel the debounce timers during device remove, not destroy

destroy isn't called until the last libinput_device_unref(), so we may trigger
a debounce timer after the device was removed. The same fix is neded for the
touchpad interface.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/72

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agosystem-quirks: Add AttrTrackpointRange for Lenovo X270
Hans de Goede [Fri, 22 Jun 2018 16:40:27 +0000 (18:40 +0200)]
system-quirks: Add AttrTrackpointRange for Lenovo X270

The trackpoint on the Lenovo X270 sends delta events with a value
of up to 40.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agogitlab CI: build a release with -Werror
Peter Hutterer [Wed, 27 Jun 2018 11:13:30 +0000 (21:13 +1000)]
gitlab CI: build a release with -Werror

Any compiler warnings in the default build are likely caught by developers
anyway. Let's build one with -Werror and the release buildtype to catch
anything triggered by optimization or somesuch.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: fix typo in pointer acceleration docs
Peter Hutterer [Wed, 27 Jun 2018 11:03:50 +0000 (21:03 +1000)]
doc: fix typo in pointer acceleration docs

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/69

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: add record/replay to --help output
Peter Hutterer [Wed, 27 Jun 2018 04:10:57 +0000 (14:10 +1000)]
tools: add record/replay to --help output

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: libinput-record: print the list of quirks
Peter Hutterer [Fri, 22 Jun 2018 06:39:01 +0000 (16:39 +1000)]
tools: libinput-record: print the list of quirks

Now that all device quirks are in the quirks subsystem we have to print those
instead of just the udev devices.

Since libinput-record is there to record system devices, the system-installed
quirk list is used (without any commandline overrides right now). This is
useful to capture misconfigurations or missing quirks on the host system.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/58

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: move printing device quirks to the shared tools lib
Peter Hutterer [Fri, 22 Jun 2018 06:37:16 +0000 (16:37 +1000)]
tools: move printing device quirks to the shared tools lib

This way we can re-use this from libinput-record instead of having to
duplicate all this. Since the two tools use different printfs, just make the
actual printing a simple callback.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: parse arguments before any other stuff
Peter Hutterer [Mon, 25 Jun 2018 06:06:34 +0000 (16:06 +1000)]
test: parse arguments before any other stuff

If the args are bad, we don't need to check for root and whatnot.

Only exception here is the debugger check because it changes defaults that we
may want to override with commandline arguments later.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotouchpad: don't disable tapping on MT_TOOL_PALM
Peter Hutterer [Mon, 25 Jun 2018 04:50:22 +0000 (14:50 +1000)]
touchpad: don't disable tapping on MT_TOOL_PALM

The tapping code can handle palm states now, so there is no need to disable
tapping altogether when a tool-based palm is detected.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/65

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: fake-build the measure touch-pressure/size sources
Peter Hutterer [Thu, 21 Jun 2018 04:38:55 +0000 (14:38 +1000)]
tools: fake-build the measure touch-pressure/size sources

This way we can make them execute the list-quirks from the builddir. And it
makes it easier to run these tools from the git directory on machines where we
have libinput without the quirks.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: add a libinput-test runner for 'deviceless' tests
Peter Hutterer [Thu, 21 Jun 2018 07:05:30 +0000 (17:05 +1000)]
test: add a libinput-test runner for 'deviceless' tests

These are tests that don't need *any* uinput devices at all. Mark them
accordingly and create a new binary that only runs those tests. This way we
can run some of the test suite even in containers where we're restricted.

Better have 10% tested than none, I guess.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: switch the global device list to a struct list
Peter Hutterer [Fri, 22 Jun 2018 06:57:51 +0000 (16:57 +1000)]
test: switch the global device list to a struct list

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: fix indentation in litest-int.h
Peter Hutterer [Fri, 22 Jun 2018 06:49:56 +0000 (16:49 +1000)]
test: fix indentation in litest-int.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: quirks: init value to avoid valgrind errors
Peter Hutterer [Fri, 22 Jun 2018 06:13:35 +0000 (16:13 +1000)]
test: quirks: init value to avoid valgrind errors

value isn't touched where the quirk doesn't exist, so we're accessing an
uninitialized variable here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: if we never installed any udev files, we don't need to reload
Peter Hutterer [Fri, 22 Jun 2018 05:47:18 +0000 (15:47 +1000)]
test: if we never installed any udev files, we don't need to reload

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: init test quirks in /tmp, not /run
Peter Hutterer [Thu, 21 Jun 2018 07:03:31 +0000 (17:03 +1000)]
test: init test quirks in /tmp, not /run

We don't need to be root to write to tmp

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoquirks: free the dt string
Peter Hutterer [Fri, 22 Jun 2018 07:18:48 +0000 (17:18 +1000)]
quirks: free the dt string

Not sure how that got through the valgind test before...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agogitlab CI: add Arch to the list of built images
Peter Hutterer [Fri, 22 Jun 2018 03:34:59 +0000 (13:34 +1000)]
gitlab CI: add Arch to the list of built images

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agogitlab CI: add pkgconfig to the list
Peter Hutterer [Fri, 22 Jun 2018 03:29:09 +0000 (13:29 +1000)]
gitlab CI: add pkgconfig to the list

It's pulled in by some dependency anyway, but for the sake of being explicit,
pull it in.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoutil: use assert() instead of abort() for testing for size limits
Peter Hutterer [Thu, 21 Jun 2018 23:36:20 +0000 (09:36 +1000)]
util: use assert() instead of abort() for testing for size limits

This way we can send a message to the user, a simple abort() isn't informative
enough.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/54

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: don't require a device for quirks parsing tests
Peter Hutterer [Thu, 21 Jun 2018 06:16:08 +0000 (16:16 +1000)]
test: don't require a device for quirks parsing tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agolibinput-private: constify inline helpers
Konstantin Kharlamov [Wed, 20 Jun 2018 11:09:58 +0000 (14:09 +0300)]
libinput-private: constify inline helpers

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
6 years agogitlab CI: run ninja test too
Peter Hutterer [Thu, 21 Jun 2018 05:03:49 +0000 (15:03 +1000)]
gitlab CI: run ninja test too

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/62

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: skip the test-suite runner based on SKIP_LIBINPUT_TEST_SUITE_RUNNER
Peter Hutterer [Thu, 21 Jun 2018 05:32:02 +0000 (15:32 +1000)]
test: skip the test-suite runner based on SKIP_LIBINPUT_TEST_SUITE_RUNNER

The current /dev/input/* check isn't reliable enough. So rather than adding
extra heuristics prone to fail add an environment variable that says "do not
run the test suite runner". All other tests are run since they do not
require/modify any specific system setup.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/62

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: libinput-replay: set INPUT_PROP_* properties on the device
Peter Hutterer [Thu, 21 Jun 2018 04:07:02 +0000 (14:07 +1000)]
tools: libinput-replay: set INPUT_PROP_* properties on the device

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/60

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agodoc: update docs to use a .yml suffix for libinput recorded files
Peter Hutterer [Thu, 21 Jun 2018 03:49:41 +0000 (13:49 +1000)]
doc: update docs to use a .yml suffix for libinput recorded files

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: libinput-record: use .yml suffix in the man page
Peter Hutterer [Thu, 21 Jun 2018 03:48:26 +0000 (13:48 +1000)]
tools: libinput-record: use .yml suffix in the man page

Makes things easier when users save it as yml file

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotest: fix zalloc max size tests
Peter Hutterer [Thu, 21 Jun 2018 04:59:58 +0000 (14:59 +1000)]
test: fix zalloc max size tests

Missing from 9873d68bf1f93b424f920a8c095e3d3ee7d3fdf5

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: touch-size: update to use the device quirks
Peter Hutterer [Thu, 21 Jun 2018 01:43:52 +0000 (11:43 +1000)]
tools: touch-size: update to use the device quirks

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/57

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agotools: touchpad-pressure: update man page for device quirks
Peter Hutterer [Thu, 21 Jun 2018 01:41:25 +0000 (11:41 +1000)]
tools: touchpad-pressure: update man page for device quirks

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/48

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years agoMerge branch 'wip/measure-thumb-pressure'
Peter Hutterer [Thu, 21 Jun 2018 01:34:11 +0000 (11:34 +1000)]
Merge branch 'wip/measure-thumb-pressure'