Commit graph

3563 commits

Author SHA1 Message Date
Peter Hutterer
a3b032bf33 gitlab CI: drop linux-firmware from the Arch image
Reduces the size of the container by a few hundred MB

Fixes #188

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-29 10:39:55 +10:00
Benjamin Tissoires
cbc447a11c GitLab CI: Fix clean up stage
we need to get the authorization token with the gitlab address, not
the registry.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-11-28 00:56:44 +00:00
Benjamin Tissoires
c104f4fb28 GitLab CI: use extends to simplify declaration of jobs
The build stage gets simpler:
- we define one high level build job
- for each type of distro, we subclass the high-level job with the
  distribution image
- then we subclass the previous jobs into specific release versions
  or specific items to check

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-11-28 00:56:44 +00:00
Benjamin Tissoires
f92a8a7ec1 GitLab CI: use buildah/podman instead of docker
well, docker has licensing issues, and the version shipped in
Fedora is getting quite old now.
We have a free open source alternative through buildah/podman/skopeo.

Build our building image in the CI too, so updates can
be achieved by just triggering the bootstrap job.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-11-28 00:56:44 +00:00
Benjamin Tissoires
4cb54af7a9 GitLab CI: replace occurrences of docker by container
We want to move away from docker, so let's not reference docker everywhere
when we can use a generic term

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-11-28 00:56:44 +00:00
Thomas Profitt
ad50a94789 quirks: Adjust MacBookPro11,2 touchpad PalmSize
The touchpad is 104mmx75mm, but an AttrPalmSizeThreshold of 800 is too
  aggressive, and even relatively-small fingers and thumbs register as
  palms sporadically, stopping the mouse until you lift your hand and try again.

1600 was chosen because it's the point at which my fingers and thumbs,
  held at a very low angle, stop registering as palms, so it should
  acommodate bigger fingers.

I don't know if the [Apple Touchpads USB] default of 800 needs to be
  updated too, or if it's a quirk of this particular touchpad.
2018-11-27 16:14:07 -06:00
Peter Hutterer
d9c82dbb70 doc/user: bugzilla → gitlab issue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-27 11:28:18 +10:00
Arick McNiel-Cho
3bb62c9732 Added quirk for HP Spectre x360 Convertable 15-bl1xx touchpad. 2018-11-23 15:10:15 -06: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
b033bc2677 tools: draw evdev events in the debug-gui
Listen to the pure evdev events from each device and print them. This makes it
slightly easier to associate certain jumps with the output, or otherwise see
that events are coming in even when libinput doesn't seem to process them
anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 15:22:20 +10:00
Peter Hutterer
4e469291b1 tools: let debug-events take a device path
This is the most common use-case other than "all from udev", so let's just
parse a device path correctly without requiring --device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 05:03:52 +00: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
36af7d312b tools: make the tools exit with exit code 2 on usage issues
This makes it easier to test for usage issues

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 05:03:52 +00:00
Peter Hutterer
bd52bf5421 tools: debug-events: install the signal handler before any libinput operations
On a CI container, we will time out trying to find the udev device for our
device node. This takes 2s, a SIGINT during this time should be treated the
same as one during the mainloop.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 05:03:52 +00:00
Peter Hutterer
22890a4719 tools: handle sigint in debug-gui
Exit with success on SIGINT

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 05:03:52 +00:00
Peter Hutterer
5685980437 path: don't leak the udev device on failure
If by sheer coincidence the device succeeds on the last try, we'd have a
leaking udev device.

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
Peter Hutterer
27bf3fb2ab tools: allow measuring single-touch ABS_PRESSURE
Fixes #173

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-06 00:24:06 +00:00
Peter Hutterer
6041d0ba69 test: fix a clang warning
test/test-misc.c:1065:28: warning: Value stored to 't' during its
initialization is never read

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-05 14:28:13 +10:00
Peter Hutterer
fcfffd80d7 tools: drop a superfluous linebreak in the list-quirks output
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-05 14:28:13 +10:00
Peter Hutterer
48a7c507f8 tools: handle the EventCodeDisable quirk in the quirks tool
This caused an assertion

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-05 14:28:13 +10:00
Peter Hutterer
83c3a3c6c8 Gitlab CI: use the docker:stable image for image creation
alpine:latest which is now the default image doesn't docker installed by
default. apk add docker results in failures
	Warning: failed to get default registry endpoint from daemon

last time all this worked was when we defaulted to the docker:stable image,
see https://gitlab.freedesktop.org/libinput/libinput/-/jobs/8316

Let's switch back to that and move on with our lives.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-02 13:13:54 +10:00
Peter Hutterer
4584a1eadd gitlab CI: buildah requires the transport protocol
Executing the script as illustrated sends it to nowhere (localhost maybe?),
prepending docker:// makes it recognize the hostname correctly and actually
upload it to gitlab.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-02 13:13:54 +10:00
Peter Hutterer
db56772de0 gitlab CI: swap Fedora 27 for Fedora 29
And run all the special stuff we currently run on F28 on F29

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-02 10:20:53 +10:00
Ryan Walklin
91e681f2cb Don't disable keyboard for Lenovo X230 Tablet in tablet mode
This also disables the special buttons on the tablet screen. Re-enabling to allow screen rotation.
2018-11-01 17:42:45 +00:00
Peter Hutterer
4286dcd1de quirks: switch a few model quirks over to use the new evcode disabling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-29 04:16:38 +00:00
Peter Hutterer
981f3a47e6 quirks: add the ability to disable custom event codes/types
This is a more flexible approach than adding a model flag and the C code to
just call libevdev_disable_event_code(). There's a risk users will think this
is is a configuration API but there are some devices out there (e.g. the
Microsoft Sculpt mouse) that need a more generic solution.

Case in point: the Sculpt mouse insists on holding BTN_SIDE down at all times.
We cannot ship any quirks for that device because we only have the receiver's
generic VID/PID. So a local override is required, but we might as well make
that one generic enough to catch other devices too in the future.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-29 04:16:38 +00:00
Peter Hutterer
49b5831159 evdev: log the wheel click angle setting
Log if we use a non-default click angle setting, makes it easier to debug
this. The condition to add the log was a bit unwieldly to read, so this also
factors out the property names to temporary variables.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-29 14:11:26 +10:00
Peter Hutterer
5fd8c7cdb8 libinput 1.12.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-24 15:23:37 +10:00
Peter Hutterer
4fa7a6b94a test: move the custom parser test structs into the functions
No need to pollute the namespace here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-22 08:16:02 +10:00
Peter Hutterer
fd9e749f1c Remove obsolete HAVE_CONFIG_H check
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-22 08:15:45 +10:00
Peter Hutterer
ec5d7702ff quirks: disable debouncing on the VMware Virtual mice
At least on MacBooks, the host emulates two clicks 8ms apart in response to a
doubletap. Those clicks are filtered by our debouncing code.

Since these are emulated devices anyway and by definition cannot have a stuck
button, let's tag them so we don't enable the debouncing code. If the button
of the physical device is stuck, that's a problem that needs to be fixed in
the host system.

Fixes #158

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-19 00:16:15 +00:00
Michał Kopeć
e96904e906 quirks: don't disable keyboard for Lenovo X60 Tablet in tablet mode
Lenovo X60 tablet has bezel buttons that are bound to the keyboard.
They should not be disabled.
2018-10-18 22:08:28 +02:00
Greg V
b0cd07bf75 quirks: use basename in a POSIX compliant way
The POSIX version of basename modifies the string (and therefore crashes
on static strings), so use safe_strdup before calling it.

glibc provides a POSIX version when libgen.h is included.
FreeBSD 12 provides a POSIX version when nothing is included, which was
causing a segfault.

Using the POSIX version correctly is the right way to avoid any such issues.
2018-10-16 13:01:02 +03:00
Peter Hutterer
430ede8266 test: add tablet-mode suspend/resume keyboard and touchpad tests
Related #155

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-16 09:26:25 +10:00
Peter Hutterer
12dc64af24 touchpad: handle a touch ending and restarting in the same frame
If a touch ends and starts again in the same frame, our touch count gets out
of whack. This later triggers an assertion when the tap touch count mismatches
the real tap count.

E: 0.105005 0003 0039 -001      # EV_ABS / ABS_MT_TRACKING_ID   -1
E: 0.105005 0003 0035 8447      # EV_ABS / ABS_MT_POSITION_X    8447
E: 0.105005 0003 0036 4479      # EV_ABS / ABS_MT_POSITION_Y    4479
E: 0.105005 0001 014a 0000      # EV_KEY / BTN_TOUCH            0
E: 0.105005 0001 0145 0000      # EV_KEY / BTN_TOOL_FINGER      0
E: 0.105005 0003 0039 0074      # EV_ABS / ABS_MT_TRACKING_ID   74
E: 0.105005 0003 0035 8388      # EV_ABS / ABS_MT_POSITION_X    8388
E: 0.105005 0003 0036 4480      # EV_ABS / ABS_MT_POSITION_Y    4480
E: 0.105005 0001 014a 0001      # EV_KEY / BTN_TOUCH            1
E: 0.105005 0001 0145 0001      # EV_KEY / BTN_TOOL_FINGER      1
E: 0.105005 0003 0000 8388      # EV_ABS / ABS_X                8388
E: 0.105005 0003 0001 4480      # EV_ABS / ABS_Y                4480
E: 0.105005 0000 0000 0000      # ------------ SYN_REPORT (0) ---------- +19ms

This is a kernel bug but let's paper over here because otherwise we crash and
that's considered impolite.

Fixes #161

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-15 14:46:53 +10:00
Peter Hutterer
782bbdb231 touchpad: only log the touch state if we have something to log
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-15 14:07:41 +10:00
Peter Hutterer
2bf3d57fe0 quirks: fix palm size threshold for the Wacom PTH660
Copy/paste error in the hwdb to quirks transition

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-10 16:36:50 +10:00
Matthias Mayr
260e43532a quirks: suppress tablet-mode for Lenovo X220T keyboard. Resolves #154
The special bezel buttons are associated to the keyboard and would
therefore mistakenly be deactivated as well. See #154.
2018-10-08 23:21:36 +02:00
Peter Hutterer
df1f6ba40f touchpad: avoid motion events when moving one finger into AREA
If a 2fg scroll motion starts with both fingers in the bottom button area and
one finger moves into the main area before the other, we used to send motion
events for that finger. Once the second finger moved into the main area the
scroll was detected correctly but by then the cursor may have moved out of the
intended focus area.

We have two transitions where we may start sending motion events: when we move
out of the bottom area and when the finger moves by more than 5mm within the
button area. In both cases, check for any touches that are in the
bottom area and started at the 'same' time as our moving touch. Mark those as
'moved' to release them for gestures so we get the right finger count and
axis/gesture events instead of just motion events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-04 10:44:55 +10:00
Peter Hutterer
60d9defdb7 touchpad: don't calculate movement for an already-moved touch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-04 10:44:55 +10:00
Peter Hutterer
d98e474953 touchpad: align the button state log messages
There's one state with a name longer than allocated but it's virtually never
triggered so let's just ignore the misalignment in that case.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-04 10:44:27 +10:00
Peter Hutterer
655f565fba touchpad: if two fingers are within the lower thumb area, they're not thumbs
The shape of the average hand implies that two fingers down within the lower
thumb area (the bottom few mm of the touchpad) cannot be thumbs without
significant contortion. So let's not mark them as thumb.

Fixes #126

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-03 14:52:36 +10:00
Peter Hutterer
9847329d2c libinput 1.12.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-03 11:41:46 +10:00
Peter Hutterer
2a83357bab doc/user: add a warning that udevadm test doesn't always work
We rely on the udev keyboard builtin to set the fuzz but that builtin isn't
run during udevadm test. So running sudo udevadm test shows the LIBINPUT_FUZZ
properties the first time round (still set from boot), but not the second time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-03 11:13:58 +10:00
Peter Hutterer
d1a0d50c30 doc/user: fix typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-03 11:13:58 +10:00
Peter Hutterer
a8e3f4d1a5 touchpad: ignore motion speed for hovering touches
tp_detect_thumb_while_moving() assumes that of the 2 fingers down, at least
one must be in TOUCH_UPDATE, otherwise we wouldn't have a speed to analyze for
thumb.

If a touch starts in HOVERING and exceeds the speed limit, we were previously
increasing the 'exceeded count'. This later leads to an assert() in
tp_detect_thumb_while_moving() when the second finger comes down because
although we have multiple fingers, none of them are in TOUCH_UPDATE.

This only happens when fingers 2 and 3 come down in the same event frame,
because then we have nfingers_down at 2 (the hovering one doesn't count) but
we don't yet have a finger in TOUCH_UPDATE.

Fix this twofold, first by now calculating the speed on anything but
TOUCH_UPDATE. And second by force-resetting the speed count on
TOUCH_BEGIN/TOUCH_END so we definitely cover all the hover transitions.

Fixes #150

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-02 22:32:55 +00:00
Peter Hutterer
b599177200 quirks: fix the trackpoint multiplier for the Dell E7470
Fixes #148

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-02 04:06:16 +00:00
Peter Hutterer
059484b8e7 touchpad: fix typo 2018-09-28 10:38:52 +10:00
Peter Hutterer
500d03d78e fallback: cancel touches, don't just release them when we suspend
When we disable the touch device, any existing touches should be cancelled,
not just released.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-27 10:27:19 +10:00