Commit graph

4064 commits

Author SHA1 Message Date
Peter Hutterer
148b147173 test: indentation fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-03 16:44:03 +10:00
Peter Hutterer
bfc4980754 test: add the test cases to the suite in the utils tests
oops...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-03 16:44:03 +10:00
Peter Hutterer
5c04bc1851 doc/user: fix some HTML formatting
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-02 22:30:22 +00:00
Björn Daase
b80413f2d5 quirks: fix horizontal scrolling for Logitech MX Master 2S on bluetooth
It turns out that the MX Master 2S also has a different PID when connected
via bluetooth, causing horizontal scrolling to not work properly. Fix this,
by also adding it with the blueetooth PID (according to
https://github.com/libratbag/libratbag/blob/master/data/devices/logitech-MX-Master-2S.device
and in line with local testing) to the quirks file.

Signed-off-by: Björn Daase <bjoern@daase.net>
2019-12-26 11:09:00 +01:00
Peter Hutterer
565f9470ff meson.build: re-add missing trailing slash to the HTTP link
Got lost in 61f81ec93e

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-23 10:57:53 +10:00
Peter Hutterer
104e4a7d49 gitlab CI: update to latest ci-templates
Rebuild all the images to make sure this still works fine.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-12 09:00:04 +10:00
Anatolii Lishchynskyi
970b5aff59 quirks: ignore mode switch button on Madcatz R.A.T.3 mouse
Avoid stuck buttons, so window managers won't behave buggy, for example:
* You click on one window, but click is emulated in another one
* You hover cursor over button/link but see no feedback
Based on quirk for Cyborg mouse.

Signed-off-by: Anatolii Lishchynskyi <iamnotacake@protonmail.com>
2019-12-11 09:45:49 +00:00
Peter Hutterer
6c55880a7d gitlab CI: fix skopeo copy
skopeo doesn't handle the destination credentials correctly

See ci-templates commit 0a9bdd33a98f05af6761ab118b5074952242aab0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-11 15:29:11 +10:00
Peter Hutterer
1f49167b69 gitlab CI: use a minimal alpine image for the commit checks
This runs at the same time as the other images being created so it'll fail if
the image itself doesn't exist yet. Since we only need pip here, let's use
alpine and install the two packages we need.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-11 12:25:56 +10:00
Peter Hutterer
8f0af85072 libinput 1.14.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-05 13:50:24 +10:00
Peter Hutterer
6c2125d1df gitlab CI: add an explanatory comment why we're hardcoding master
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-05 10:40:40 +10:00
Peter Hutterer
9d996a0420 gitlab CI: add a local emulation mode to the gitlab CI script
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-05 10:40:40 +10:00
Peter Hutterer
902806c750 gitlab CI: make the commit check errors more verbose and useful
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-05 10:40:40 +10:00
Peter Hutterer
7f2749a03d gitlab CI: don't try adding the upstream remote if it exists already
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-05 10:40:40 +10:00
Peter Hutterer
11e97c2e64 Expand the CODING_STYLE with an explanation of commit requirements
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-05 10:40:37 +10:00
Peter Hutterer
2d1bcf982a pad: add LIBINPUT_EVENT_TABLET_PAD_KEY for pad keys
The Wacom Cintiq 24HD and later tablets send specific key events for
hardware/soft buttons. KEY_PROG1..KEY_PROG3 on earlier tablets,
KEY_CONTROLPANEL, KEY_ONSCREEN_DISPLAY, and KEY_BUTTONCONFIG on later tablets.
We ignore KEY_PROG1-3 because starting with kernel 5.4 older tablets will too
use the better-named #defines.

These differ from pad buttons as the key code in itself carries semantic
information, so we should pass them on as-is instead of mapping them to
meaningless 0-indexed buttons like we do on the other buttons.

So let's add a new event, LIBINPUT_EVENT_TABLET_PAD_KEY and the associated
functions to handle that case.

Pad keys have a fixed hw-defined semantic meaning and are thus not part of
a tablet mode group.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-04 15:38:39 +10:00
Peter Hutterer
27fda918d8 pad: switch the button mapping to one that can handle keys or buttons
No functional changes, we still use the same bits everywhere.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-04 15:31:46 +10:00
Peter Hutterer
9696f37393 tools: debug-events: don't overrun the device array with too many arguments
Only the --device option was checked for argument count, not the rest so it's
easy to overrun the array by specifying too many devices.

Except: this was a theoretical bug only, more than 64 arguments trigger
an assertion in the argv processing in tools/shared.c anyway. Let's drop the
debug-events limit to 60 devices so we can at least have a test for this.

Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-04 12:50:11 +10:00
Peter Hutterer
b8bbf424de gitlab CI: run the meson script for the VMs as well
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 14:36:00 +01:00
Peter Hutterer
142399f8a3 gitlab CI: move the build instructions into a bash file
Extending/debugging scripts in the gitlab CI directly is a pain, the
turnaround cycle is terrible. Let's move this into a shellscript that we can
just call directly.

Bonus side-effect: if we wanted to extend the script: set somewhere, this is
now much easier to override.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 14:35:55 +01:00
Peter Hutterer
3f051ca9d8 gitlab CI: add meson to junit script
This script was written by Emmanuele Bassi, copied from
https://gist.github.com/ebassi/e5296ec77ae9e0d3a33fd483b5613b09/

It converts meson test results into a junit file which we can then use to
display in the merge request GUI.

Note that as litest writes out junit files as well, some tests are reported
twice. Specifically: where litest fails the failure will be reported once
through litest itself and once by meson test. Oh well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 11:52:54 +01:00
Peter Hutterer
3ac525db19 test: write our test case results out as junit xml files
libcheck has the ability to write out XML files for test results, but
converting those into junit isn't ideal, for a number of reasons:
- junit xml is different to libcheck's xml, so not all data is available or
  useful. Especially with our litest wrappers around it.
- litest forking off tests means we have to wrap around everything anyway to
  avoid multiple forks writing to the same test file.

This is the minimal implementation since it's only user is likely the CI which
we control fairly tightly. So there are a few corners we can skip:
- no filename validation is performed by litest
- we write out a lot of junit xml files (one per litest fork). Rather than
  collating those we just rely on the CI to find the files.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 11:52:54 +01:00
Peter Hutterer
773b322e8b gitlab CI: apply some basic validity checks on the commit messages
Let's stop merge requests from users that don't set their git author name and
email address. Aside from it looking stange in the history it'll also make it
virtually impossible to ever find that user again should something important
arise in the future - especially if we switch off gitlab.

The rest is basic style, short subject lines, Signed-off-by lines and correct
formatting.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
[bentiss: use /usr/bin/env python3 as requested by the CI]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-11-28 11:43:26 +01:00
Peter Hutterer
c63c3b2f7b gitlab CI: rename the container_prep state to just "prep"
So we can shove other stuff in there without it looking strange.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 11:15:27 +01:00
Peter Hutterer
6824125412 gitlab CI: use multiple extends for the default artifact/build snippets
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 05:00:26 +00:00
Peter Hutterer
caa3ea7801 gitlab CI: use multiple extends over anchors for the upstream pull
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 05:00:26 +00:00
Peter Hutterer
a3a1f4f3d9 gitlab CI: add a global policy snippet for retries and interruptible
We want to retry if we have a system/timeout/stuck failure. And our jobs are
all interruptible, we want to cancel them when the branch has new commits.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 05:00:26 +00:00
Peter Hutterer
25105d0434 gitlab CI: split all extends into multiple lines
No functional changes, this merely prepares the file for easier multiple
extends.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 05:00:26 +00:00
Peter Hutterer
47767290a7 tools: print the libinput version in debug-events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 15:16:30 +10:00
Peter Hutterer
eb16ce2520 tools: libinput-record: drop the explicit --multiple argument
If we want to record multiple events, let's just specify multiple event nodes.
No need for a specific extra argument here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 10:34:18 +10:00
Peter Hutterer
5a275ef171 tools: libinput-record: return the correct exit value on invalid usage
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 10:34:18 +10:00
Peter Hutterer
1457ac8446 tools: libinput-record: bail out on invalid commandline arguments
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 10:34:18 +10:00
Peter Hutterer
03bc7121eb tools: print stderr/stdout when a option test fails
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 10:34:18 +10:00
Peter Hutterer
5dc1a7ebd3 Adjust for 64bit time_t for 32bit architectures
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-26 15:11:44 +10:00
satrmb
29785df999 touchpad: simplify tapping state machine by eliminating the multitap states
Alternating between TAPPED and DRAGGING_OR_MULTITAP on repeated taps is enough, no need for more states.
2019-11-26 02:34:44 +00:00
satrmb
bba79754d6 test: fix a multitap test expecting one tap too few
The problem was masked by a missing timeout, causing one up / down pair to not yet be enqueued before reading the queue.
2019-11-26 02:34:44 +00:00
Peter Hutterer
490131ff61 tools: make debug-events accept multiple device nodes
For interaction between devices it's necessary to look at more than one device
at a time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-26 00:34:08 +00:00
Peter Hutterer
765f7917bb tools: replay: fix wrong timestamps for multiple device replay
When multiple devices are recorded, the event times are offset from a global
baseline. Each device thus has a different offset for the first event. To
replay correctly, we must figure out the offset of the first event (across all
devices) and use that for all of them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-25 23:06:09 +00:00
Rasmus Thomsen
8b492eaaa5 Add Palm&ThumbPressureThreshold for the Spectre x360 15-ch0xx
Without this palm rejection doesn't work properly, making typing pretty
annoying.
2019-11-25 02:02:55 +00:00
Peter Hutterer
61ce80c5b1 completion: add the new libinput debug-tablet to the zsh completion files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-19 14:48:54 +10:00
Peter Hutterer
f87a6203ee tools: print the tip state in the tablet debugging tool 2019-11-19 09:56:14 +10:00
Peter Hutterer
c9e9ea3840 tools: add stylus button support
For the evdev events only a few hand-selected ones, all other ones are ignored
for now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-19 09:56:14 +10:00
Peter Hutterer
733eb07eda tools: add a tablet debugging tool
Nothing sophisticated but easier to debug certain tablet oddities.
It shows a bar for each axis on the tablet (and the evdev axis) and prints
that relative to the axis range. This makes it easy to check if we do hit the
full range (especially for distance/pressure/tilt) and whether that matches
with what the device gives us.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-19 09:56:14 +10:00
Peter Hutterer
2c613feb0c tools: debug-events: expand timestamp prints to full millis
Tens of millis is not quite enough in some cases.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-18 22:43:48 +00:00
Peter Hutterer
558cc3f11c tools: debug-events: offset timestamps by the first normal event
Start counting the timestamps from the first time we get something off the
actual fd. This makes it easier to match up timestamps with the output from
libinput record.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-18 22:43:48 +00:00
Peter Hutterer
eef00ff3c6 tools: libinput-record: expand the evdev event value to 7 digits
MSC_TIMESTAMPS need 7 digits so let's make sure everything is nicely aligned

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-18 05:34:56 +00:00
Peter Hutterer
db546c368c doc: remove the direct link to the various state diagrams
draw.io is playing up with old files and sending me into a redirect loop.
Duplicating files works but that changes the links. So to avoid dead links,
let's just remove the direct link and let anyone who cares enough about it ask
me.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-15 00:24:00 +00:00
Peter Hutterer
a524cf9761 test: allow for substring matching in the various --filter- arguments
A unique substring of a test/group/device should be enough to filter, even
without surrounding it with asterisks.

This allows for things like --filter-device=t440 as opposed to the previous
--filter-device="*t440*".

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-15 00:24:00 +00:00
Peter Hutterer
2c4105ae51 doc: updates to the tap state machine
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-15 00:24:00 +00:00
Peter Hutterer
271616265b touchpad: don't allow for multifinger tapping after a move
In the current implementation, movements > threshold and timeouts usually move
to HOLD state and continue from there. Where a finger is lifted, we go back
up the diagram into the previous finger count's HOLD state.

The side-effect of this is that a tap of a finger can be counted as tap even
after a movement:

- two fingers down, move to scroll, hold down
- third finger down, third finger up

This sequence triggers an erroneous three-finger tap. Once the motion
threshold is hit by any touch, no finger must trigger 2/3 finger tap events
while any touch is down.

The false tap is only triggered where the new finger can execute a tap without
any other finger changing any property. This can be triggered on the
reporter's Dell Precision 5520 but on most other touchpads, a new finger down
will trigger slight movement, pressure or touch size updates and thus the bug
cannot be triggered.

Fixes #382

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-15 00:24:00 +00:00