Commit graph

253 commits

Author SHA1 Message Date
Peter Hutterer
7a12e460c0 libinput 1.14.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-26 11:38:05 +10:00
Ronan Pigott
a67b652332 completion: add libinput(1) zsh completions 2019-08-13 15:05:35 -07:00
Peter Hutterer
cc35d33f29 libinput 1.14.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 14:58:55 +10:00
Peter Hutterer
f5fc850a08 meson.build: drop explicit install:true from configure_file
meson implicitly sets install to whether install_dir is nonzero. Which means
it's superfluous anyway and removing it drops the meson warning:

WARNING: Project specifies a minimum meson_version '>= 0.41.0' but uses
features which were added in newer versions:
 * 0.50.0: {'install arg in configure_file'}

Fixes #334

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-02 22:45:16 +10:00
Peter Hutterer
5b20d7f482 libinput 1.13.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-31 10:23:29 +10:00
Peter Hutterer
bfec41b7a5 libinput 1.13.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-19 11:30:37 +10:00
Peter Hutterer
6e27a100b5 touchpad: add a helper function for checking thumb state
No functional changes

Extracted from Matt Mayfield's thumb detection patches.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-15 13:08:47 +10:00
Peter Hutterer
7b9affcf4b meson: run the test suite per group
We can't run this in parallel so it doesn't gain us any speed advantage. If
anything, it'll be slower because it's more setup time in between. But: meson
doesn't display the result until the test suite finished, so having this
broken up into smaller chunks means we're more likely to see a general failure
early.

And the failure should be quicker to reproduce as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-08 13:46:20 +10:00
Peter Hutterer
63e7942008 meson.build: move the leftover udev rule check up
ninja executes the test in the same order but we don't want to waste 5 minutes
testing other things when we have a udev rule leftover from a previous run.

Plus, this test can't be run in parallel with others, so in the worst case we
had to wait for several long-running tests to finish before this one could be
started.

To avoid all this, let's move this up to be the first check.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-08 13:25:32 +10:00
Peter Hutterer
ffa487fac3 quirks: rename the cyapa quirks file to cypress
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-27 11:20:05 +10:00
Peter Hutterer
aa538dc5c8 meson: force litest to use the right udev rules
We generate litest-specific udev rules that contain the path to the binaries
in the builddir. But litest wasn't using those, so IMPORT would run things in
/usr/lib/udev instead. Thus any changes to those binaries generated false test
results depending on how compatible the system-installed libinput was.

This is why 410b157 passed the test suite for example.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-27 11:17:28 +10:00
Peter Hutterer
523c82abb5 meson: increase the test time for the selftest suite
Because it's timing out on the XPS

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-26 21:07:24 +10:00
Peter Hutterer
b12084ef76 tools: skip debug-gui option testing if the debug-gui is disabled
Fixes #311

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-26 03:23:55 +00:00
Peter Hutterer
e65392c2f5 udev: rename libinput-model-quirks rules to libinput-fuzz-override.rules
Because these days, that's all it does

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-26 12:21:17 +10:00
Peter Hutterer
9cb089f2b6 tablet: disable the forced proximity out for the Dell Canvas pen
This pen has random timeouts, often when a button is pressed. This causes a
forced proximity out (and the button release) and makes the whole device a
tad unusable.

Nothing we can detect by heuristics since it looks like other devices that
don't send proximity out events. And the timeout can be quite high, the
recording in #304 has over 800ms for one sequence.

Fixes #304

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-17 14:39:58 +10:00
Peter Hutterer
90216a010a path: drop the separate header, not necessary
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-11 15:49:02 +10:00
Peter Hutterer
bf4277623f Add a new dispatch interface for the Dell Canvas Totem
This device looks similar to a MT device on the kernel side, but it's not a
MT device and it's not quite a tablet either. It uses slots to track up to 4
totems off the same device and the only hint that it's not a MT device is that
it sends ABS_MT_TOOL_TYPE / MT_TOOL_DIAL.

udev thinks it's a touchscreen and a tablet but we currently init those
devices as touchscreen (because all wacom tablet touch devices are udev
tablets+tochscreens). So we need a quirk to hook onto this device.

And we use a completely separate dispatch implementation, because adding the
behavior to the tablet interface requires so many exceptions that it's easier
to just add a separate dispatch interface.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-07 01:03:21 +00:00
Peter Hutterer
ee1bc318d5 Abstract libwacom database initialization into a single place
No real changes for the non-tablet code, but for tablets we now keep the
libwacom datbase around. The primary motivating factor here is response time
during tests - initializing the database under valgrind took longer than the
proximity timeouts and caused random test case failures when a proximity out
was triggered before we even got to process the first event.

This is unfortunately a burden on the runtime now since we keep libwacom
around whenever a tablet is connected. Not much of an impact though, I
suspect, chances are you're running a web browser and everything pales against
that anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-05-28 10:32:08 +10:00
Peter Hutterer
9b414faea2 test: allow for a LITEST_JOBS environment variable
valgrind struggles with too many parallel jobs, too easy to hit timeouts.
Let's reduce this for the valgrind runs.

Meson doesn't let us pass arguments through depending on the setup, so let's
make this an environment value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-05-28 10:23:25 +10:00
Peter Hutterer
d2cce8298d test: always set CK_FORK=no under valgrind
Set this in the code rather than the environment variable to make it easier to
run valgrind manually.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-05-27 21:02:33 +10:00
Peter Hutterer
01efe9de4f test: replace the USING_VALGRIND env with the valgrind.h header
This header is intended to be included in the project, so let's do that and
have proper runtime detection of the valgrind environment.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-05-07 04:48:00 +00:00
Peter Hutterer
e9cfa513ee meson: group all tests under suite names
Three suite names to allow for filtering tests: 'valgrind', 'root',
'hardware'. The latter two require root/hardware to succeed, the former labels
tests that should be run under valgrind.

Usage is documented in the docs now, but basically:

$ meson test --setup=valgrind --suite=valgrind
$ meson test --no-suite=root

This is documented a bit now and because we now rely on meson test, let's
replace all ninja test invocations with meson test instead for consistency.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-05-07 04:48:00 +00:00
Peter Hutterer
32bf9f2990 tools: fix waiting for the tool to quit in the options test
Just use the wait() timeout directly instead of sleep and kill. This allows us
to have a longer timeout and still get fast handling where the tool
immediately exits, but less failure when running on busy machines.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-04-09 13:41:03 +10:00
Peter Hutterer
9bba14990a tablet: always enable the proximity out quirk
Don't require a quirk update, just enable this by default for all tablets. If
we get a proximity out event at the right time, the quirk is disabled for that
tablet for the rest of its lifetime. And it's virtually impossible to have a
false positive here anyway - you cannot hold the pen still enough to not
trigger events for 50ms.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-04-08 11:19:19 +10:00
Peter Hutterer
e5fdd59b2d meson.build: bump to 1.13.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-04-01 16:00:35 +10:00
Peter Hutterer
72b3f657c4 quirks: add a test to make sure all our quirks files are listed in meson
Simple diff between the file list and what ls gives us in the quirks
directory.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-04-01 09:22:43 +10:00
Peter Hutterer
1b1a9f636f meson.build: add the toshiba quirks file to the file list
Was added to git in c741a42aec but not added to
meson's file list.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-04-01 09:21:07 +10:00
Peter Hutterer
8610c18086 libinput 1.13.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-29 09:39:30 +10:00
Peter Hutterer
79293ea456 tools: fix the tool option parse test to handle unittest arguments
Pass arguments we don't handle directly through to the unittest module. This
way we can filter tests with -k testname etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-28 15:47:31 +10:00
Peter Hutterer
5a041de7a6 test: drop remnants of the test device udev rules
Removed with 27188228fd but we still had the
meson define being set.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-22 03:21:22 +00:00
Peter Hutterer
c11810a4a3 libinput 1.12.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-21 15:19:46 +10:00
Peter Hutterer
b8123db0df meson.build: make valgrind optional
Now that we're providing the test suite as installed option, distributions
will likely include it as a test package. valgrind is only used for the
meson-specifc test setup. So let's make it optional.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-15 04:10:39 +00:00
Peter Hutterer
d77a42a84c libinput 1.12.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-14 15:14:30 +10:00
Peter Hutterer
be7045cdc7 test: make the test suite runner available as installed binary
Available as 'libinput test-suite'. This also renames the bit in the build
directory now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-14 12:04:22 +10:00
Peter Hutterer
d4f5faae0d tools: move the builddir lookup function out to a separate file
We want to use this from the tests as well soon, so let's move it to a more
generic location. This also changes the API to be slightly more sensible, a
free() is the same cost (and safer) than passing a static buffer in and hoping
we didn't get the size wrong.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-14 11:28:05 +10:00
Peter Hutterer
cbbd5b15c6 test: split out the unit tests into a separate test suite
All the bits that test for utility functions to work correctly can be run
separately from the main test suite (which tests devices and libinput in
general). These bits here are the ones that test the code itself and aren't
reliant on anything else.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-14 11:28:05 +10:00
Peter Hutterer
c0f4ede0c2 test: split the library version test out
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-14 11:28:05 +10:00
Peter Hutterer
27188228fd test: install the test device udev rule from a string
It's a one-liner, we don't need this as a separate file. Plus, this makes the
test suite runner less dependent on the build directory.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-14 11:28:05 +10:00
Peter Hutterer
c879b47b38 test: split the test-specific #defines out
These don't need to be in the libinput config.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-14 11:28:04 +10:00
Peter Hutterer
d7f67f4e5e meson.build: define HAVE_LOCALE_H
Regression introduced in 99bb0ee7cb,
HAVE_LOCALE_H isn't defined by default, we need to set it manually.

Reported-by: Pascal Kockwelp
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-02-07 16:26:48 +10:00
Jan Beich
6a720eb582 meson.build: gnu90 alias for gnu89 may not be supported
cc1: error: unrecognized command line option "-std=gnu90"
2019-02-03 09:28:58 +00:00
Peter Hutterer
6f1595a2db meson.build: replace manual checks with cc.has_function()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-01-31 00:10:21 +00:00
Peter Hutterer
b4e97f68b5 meson.build: bump to 1.12.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-01-31 09:47:52 +10:00
Peter Seiderer
4516ba977c meson.build: enable CPP include check only in case CPP compiler is available
Drop hard meson C++/CPP dependency, only needed for the build-time
header inclusion test, build the test only in case C++/CPP compiler
is available.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-01-15 15:46:51 +10:00
Christoffer Holmstedt
fc029e3fb5 quirks: add ModelBouncingKeys for Contour RollerMouse
The Contour RollerMouse have a button for "double click" which emulates
a double click. The two clicks are so close together that with libinput
heuristics it looks like a worn-out button and triggers debouncing
functionality.

This commit adds support for the RollerMouse Free 2 and RollerMouse
Re:d.

Fixes libinput/libinput#204
2019-01-13 10:37:04 +01:00
Peter Hutterer
62bcac30fc test: add test devices for the Cintiq Pro 16
Reconstructed from the HID descriptors here:
https://github.com/linuxwacom/wacom-hid-descriptors/tree/master/Wacom Cintiq Pro 16/

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-01-04 03:53:37 +00:00
Peter Hutterer
dbe41d8023 Drop explicit version requirement for libevdev
The minimum version of libevdev we require is so old that we really don't need
an explicity requirement here anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-12-11 12:37:40 +10:00
Peter Hutterer
51ffff3673 meson: increase timeout for the option parsing test
I've had runs with up to 50s, so let's cap it at 2 minutes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-09 10:10:58 +10:00
Peter Hutterer
5cd27b070e tools: add a test for tool option parsing
We don't check for correctness in the output as such, just that whatever
combination of cmdline arguments still works/doesn't work. This is the
scaffolding and a few tests, but needs to be filled in, especially for
libinput measure and for some more complex combinations.

valgrind: requires one more python-related suppression
gitlab-ci: requires another environment variable so we know to skip the
	   --device tests (udev will time out on those)
meson: skip the test run in release builds, we pass the full path to the built
       libinput tool but rely on the subtool lookup that won't work in a
       release build

Fixes #174

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 05:03:52 +00:00
Peter Hutterer
67b2e3264b libinput 1.12.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 14:37:47 +10:00