Commit graph

3705 commits

Author SHA1 Message Date
Benjamin Tissoires
e2cdc4efdd CI: use the template for fedora
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-04-01 04:11:20 +00:00
Benjamin Tissoires
5789e8b930 CI: clean up all but the correct tag
We should rely on the provided tag, not latest.
Move the clean stage at the end, there is no point in running it at
the beginning.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-04-01 04:11:20 +00:00
Benjamin Tissoires
ab6536682b CI: heavily rework the container creation
Now everybody gets to rebuild their own containers if there is a change
(too old or change in the packages). This should allow the MR touching
the package list to succeed.

Removal of the container_check stage, we can just have this in a
before_script.

Removal of the manual creation of the containers, not needed as we better
just increment <DISTRO>_TAG.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-04-01 04:11:20 +00:00
Benjamin Tissoires
93cec9197a CI: remove the bootstrapping stage
We want to have a common repo for the containers templates.
So we can reuse the produced image from this repo and remove our custom
bootstrap image.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-04-01 04:11:20 +00:00
Peter Hutterer
247b2344a5 tools: record: increase value size to 6 digits
Tablets commonly have higher axis ranges, might as well make sure they line
up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-04-01 09:45:29 +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
Tobias Stoeckmann
a46f7dff6b Removed whitespace from filename.
Having a whitespace at the end of a quirks file is not useful.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-03-29 12:34:27 +01: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
31d1aa7f28 test: add another valgrind suppression for Python
This triggers on Fedora 30, even though skip skip the tools options test when
running under valgrind.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-28 16:14:08 +10:00
Peter Hutterer
56dfa2f6c0 test: fix tool option parsing tests for signals
Not sure how this ever worked correctly: a process terminated by a signal has
the negative signo as return code. This would apply to every debug-events and
debug-gui test because they have to get killed by a signal. This failed
occasionally, presumably a race with the GTK startup/signal handler/whatever.

Fix this by a) sending SIGQUIT because that won't get handled by the tools and
b) prending that if we get a -SIGQUIT exit code, everything is fine.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-28 15:47:31 +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
5d7c93a3d1 doc/api: improve readability of the API docs
Still not great and probably makes any professional designer's eyes bleed, but
at least it's more readable now.

Changes:
- spacing after param name so they don't cuddle up with the description
- color changes and background image removals to drop the doxygen default look
- font size changes to not make things overrun
- font family change to make the function prototypes readable

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-27 16:01:10 +10:00
Peter Hutterer
26702e4d73 Fix three coverity complaints
Two resource leaks, one uninitialized variable.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-25 15:15:13 +10:00
Peter Hutterer
2edc7e37ac test: mark the protocol A device as touch device
Now that we're emulating everything correctly, let's mark it as proper touch
device.

Two test cases need to be excluded:
- double-down triggers an assert in the test device because this isn't
  possible this way with protocol A devices
- the axisrange warning test can't be triggered, mtdev clips those axes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-22 16:23:17 +10:00
Peter Hutterer
44702e947c test: switch the protocol A test device to be an actual protocol A device
This device mostly behaved like a normal touch device except for
SYN_MT_REPORT. Switch it to behave like a real protocol A device and adjust
the test accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-22 16:23:17 +10:00
Peter Hutterer
11adaadd51 test: let the device custom create method return a bool
This is so we can tell litest to create the device anyway, useful for when all
we have to do in the custom create is allocate some memory.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-22 16:23:17 +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
566d73aa3d test: don't install our normal rules file in installed mode
When running the test-suite, don't install our rules for device groups and
model quirks - they're expected to be present already.

Plus, since we copy them from the meson build dir, we don't have
those files available anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-22 03:21:22 +00:00
Konstantin Kharlamov
3a8631a88d evdev: remove unnecessary comparison
All "goto err" resides after fd have been properly initialized.

Fixes "Comparison is always true because fd >= 0." warning by LGTM.

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-03-22 00:02:24 +03:00
Konstantin Kharlamov
661a6d0169 evdev: fix "always false" comparison
Fixes "Comparison is always false because rc >= 0." warning by LGTM.

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-03-21 23:57:03 +03: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
Benjamin Poirier
5e798a2a6e evdev: Rename button up and down states to mirror each other
The button up debouncing states mirror the button down states with the
addition of the spurious debouncing states. Rename the states to better
show this symmetry.
2019-03-21 01:07:59 +00:00
Paolo Giangrandi
a88d73cef4 touchpad: multitap state transitions use the same timing used for taps
Multitap sequences (more than 2 taps) had a 180ms timer set only on press,
not on release.
New taps within those 180ms could either trigger multitap+drag or another
multitap (for N+1 taps), resetting the timer on press once again.
If no new tap appears within those 180ms, the sequence was considered
complete.

This behavior differed from regular taps: for the very first tap of a
sequence the timer was set both on touch and on release.

The multitap timing caused misdetection of triple-tap-and-drag sequences as
the timer was hit frequently. Some of those were correctly detected, others
as tripletap only.

Changing the timer to be set on press **and** release gives us a more lenient
timeout. 180ms for tap-and-drag and 180ms for the next tap down after
release. This was also the behavior for the xorg synaptics driver.

Note that quadruple-tap-and-drag didn't suffer from this because the timeout
resulted in double-tap + double-tap-and-drag. Which has the same
user-visible effect.
2019-03-18 02:45:00 -06:00
Feldwor
c741a42aec Set TouchPad Pressure Range for Toshiba L855 2019-03-17 21:45:43 +00: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
a4b9813b92 tools: flake8 fixes, typo fixes and missing exception handling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-15 12:01:51 +10: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
2df11f8708 test: add an option to skip installing our quirks into the test system
This allows us to run the test suite runner against the installed system
rather than always using the build tree quirks.

The actual option will be removed in a future commit, it is just here for
commit consistency and testing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-14 11:28:05 +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
bda69ad6c6 test: move the double assert macros to a separate header
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
4e0a362803 test: split up the quirks installations
No functional changes

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
fefddeda4d test: add --help to the test suite runner
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-14 11:28:00 +10:00
Peter Hutterer
d7282a3d9d tools: skip the option parsing test during valgrind
We don't want to valgrind through python...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-12 15:10:15 +10:00
Peter Hutterer
5a05e41940 test: clip the exit code to 255
If more than 255 tests fail, we're returning an exit code outside of the POSIX
standard. This only takes effect for -j1, where we fork off we only ever have
a failed value of 1 anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-12 15:10:15 +10:00
Peter Hutterer
87abdf1f63 test: minor warning message change
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-12 15:10:15 +10:00
Peter Hutterer
f618390a00 doc/user: put an extra note in regarding the test suite
Running the test suite runner is good, but not sufficient, a full ninja test
is required to get the full coverage.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-12 15:10:15 +10:00
Peter Hutterer
dc5c80d3a8 doc/user: correct the test suite runner invocation
With meson this is now in the build directory

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-12 15:10:15 +10:00
Peter Hutterer
9a2d6f55b1 include: sync kernel headers for v5.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-06 01:30:59 +00:00
Peter Hutterer
1150a8442f tools: display the discrete axis steps too
Draw a second smaller scroll bar that moves with every discrete step. For that
to work, we have to accumulate the value from the normal scroll events until
we get the first discrete one, then move up.

The value per discrete event changes depending on the click wheel angle, so we
can't just use discrete on its own if we want the two scroll bars aligned.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-04 15:47:27 +10:00
Peter Hutterer
d213804de8 tools: group the scroll bits into a struct
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-04 15:47:27 +10:00
Peter Hutterer
43cbae6c68 fallback: fix grammar in comment
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-04 15:47:27 +10:00
Peter Hutterer
1272db297a tools: record: print a helpful error message when we don't have devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-04 04:54:27 +00:00
Benjamin Poirier
fa73b3b307 evdev: Do not perform spurious detection when spurious is already enabled
When exiting RELEASE_DELAYED state, do not transition into states to detect
the need for spurious mode (RELEASE_WAITING, MAYBE_SPURIOUS).
RELEASE_DELAYED is only entered when spurious mode is enabled, there is no
need to detect the need for spurious mode again.
2019-03-04 14:48:22 +10:00
Henré Botha
5dae7aac38 Reduce button scroll timeout to 38ms
When using button scrolling, a hardcoded delay of 200 milliseconds between
button down and scroll events being emitted makes fast scrolling gestures feel
clunky and sometimes fail entirely. This feature comes from
xf86-input-mouse, was copied into xf86-input-evdev and reimplemented in
libinput.

This was, as far as can be determined, to allow right clicks without
triggering scrolling. libinput now also has distance triggers (2bbf4a0117)
and sends button events if no movement has happened for long clicks,
regardless of the delay.

The 200ms delay is thus not really necessary anymore, let's drop it to 38ms
which is just above the 3-event threshold for 8/10/12ms intervals which is
most devices.

Fixes #237

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-02-19 10:37:05 +10:00