Commit graph

3924 commits

Author SHA1 Message Date
Jakub Schmidtke
62382f7d79 Fixed horizontal scrolling on Logitech MX Master 2S/3
Logitech MX Master 2S and 3 by default use natural scrolling
for the horizontal scroll wheel, while the main wheel
uses traditional mode. This change inverts the default
direction of horizontal scrolling.

(cherry picked from commit 8490384c68)
2019-10-16 13:38:23 +10:00
John Chadwick
a7d2b749f3 test: Make udev_properties array fixed-size.
The udev_properties array is currently variable length, which causes the
tests to invoke undefined behavior on empty lists, as it attempts to
access the first array item to check if the key is NULL, which is an out
of bounds read and will fail when the struct alignment happens to line
up such that there is no padding after the list in the empty list case.

By making the udev_properties array 32 items long, it can encapsulate
every existing case, with only a fairly small amount of memory overhead,
and without requiring every single `TEST_DEVICE` call to initialize
`udev_properties`.

(cherry picked from commit b71a1b6e2d)
2019-10-16 13:38:11 +10:00
Peter Hutterer
c8daa2c0a1 gestures: where we have more fingers than slots, default to swipe
Fixes #360

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit cb1be90439)
2019-10-16 13:37:50 +10:00
Peter Hutterer
093a87898b touchpad: only identify for pinch in a distinct pinch position
Previously, any lower finger spaced more than the vertical threshold apart
would be labelled as thumb. This causes some taps to be detected as
single-taps, particularly where the user's hand is at an angle that causes the
touches to be effectively vertical.

Restructure that condition so that we only go for a thumb if we're
distinctively apart, and we only *not* go for thumb if we're distinctively
close together.

Fixes #359

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0ce06d1314)
2019-10-16 13:37:43 +10:00
Serhii Chaplia
ad7708f6a5 Touchpad fix and trackpoint speed adjustment for Lenovo T490s
Same issue as #177

(cherry picked from commit 79e91f8a30)
2019-10-16 13:37:30 +10:00
Richard McIntosh
b927b42235 Added magic trackpoint multiplier for Thinkpad 13 G2
(cherry picked from commit 4f9a795765)
2019-10-16 13:36:45 +10:00
RussianNeuroMancer
b9ba9e7236 Mark HP Elite x2 1013 G3 keyboard as external
Keyboard+touchpad is external:
http://h10032.www1.hp.com/ctg/Manual/c06077534 (page 12)

(cherry picked from commit 8635d546ce)
2019-10-16 13:36:42 +10:00
RussianNeuroMancer
535cc9879b Tablet Mode Switch on HP Elite x2 1013 G3 is unreliable:
https://bugzilla.kernel.org/show_bug.cgi?id=204719
https://bugzilla.kernel.org/show_bug.cgi?id=204739

Keyboard+touchpad is external:
http://h10032.www1.hp.com/ctg/Manual/c06077534 (page 12)

(cherry picked from commit 3c13dd9ccd)
2019-10-16 13:36:41 +10:00
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
Matt Mayfield
73d55cc6c5 touchpad: don't allow gestures with a clickpad button down by a finger
Allowing gestures when holding a physical click enables tasks like
switching workspaces while dragging an icon, but this should only be
possible with a *thumb* holding down the clickpad, not fingers. This
commit restores the ability to hold down the clickpad with two or three
fingers to right- or middle-drag.

Fixes #339, #340

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-16 14:48:52 +10:00
Ronan Pigott
ac007401bb tools: fix typo in debug-events 2019-08-13 15:26:53 -07:00
Ronan Pigott
a67b652332 completion: add libinput(1) zsh completions 2019-08-13 15:05:35 -07:00
Kevin Kaland
894d8fe0d3 Fix double click button.
This fixes the double click button on the RollerMouse v3 (USB ID 0b33:1004).
2019-08-11 20:02:18 +00: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
d93feba134 tablet: scale the available pressure range into the pressure thresholds
Pens that don't have a pressure offset (caused by a worn-out tip) still have
basic pressure thresholds to avoid tip events when we're still a bit away from
the tablet or barely touching it. That range is currently 5% of the pressure
for tip down, 1% for tip up.

This leaves us with 95% of the range and that needs to be scaled correctly,
otherwise the bottom 5% happen before a tip event and are inaccessible where
applications don't look at pressure before tip down.

Fixes #332

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 13:58:54 +10:00
Peter Hutterer
78efec3d2f test: don't test at the 100 y range
Theoretically this shouldn't matter, but testing at the far end of the range
is bound to trigger some little issues eventually that should be triggered
explicitly, not by accident.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 13:58:54 +10:00
Peter Hutterer
72121d6f6c tablet: reduce the pressure range by the offset
Previously, the pressure range was calculated from the axis total range. A
device with a pressure offset making the bottom 10% inaccessible would lose
10% of that range as non-accessible. Due to the implementation, this affected
the upper range of the device, so the top N percent became unaccessible. Which
may be why no-one's noticed this yet.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 13:58:54 +10:00
Peter Hutterer
f97e361d5d tablet: make the pressure-offset inclusive of the axis minimum
The offset handling was inconsistent, stored as relative to the axis minimum
but used as absolute in some places. Fix this by always using the absolute
value including the minimum (i.e. no pressure offset means offset == minimum).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 13:58:54 +10:00
Peter Hutterer
ad13116f4e test: fix the pressure offset tests
Unsuprisingly, a normalized [0,1] value will always be between 0 and 1, so
bhis gave us a false positive. Check for the real values instead.

Those values aren't 100% correct because of a bug in the offset handling which
will be fixed in a follow-up commit. The difference is near enough that it
doesn't matter here anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 13:58:54 +10:00
Peter Hutterer
031fbc84bd Add the ck_double_eq_tol() macros to the backwards compat headers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 13:58:54 +10:00
Peter Hutterer
a71d091e59 tablet: add a comment explaining why we adjust the pressure offset downwards
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 12:54:52 +10:00
Peter Hutterer
c5865f3ef0 tablet: point the pressure offset log messages to the right URL
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 12:54:52 +10:00
Benjamin Tissoires
576bc2e5e6 tests: increase the timeout for the subprocess to receive the quit signal
On a very loaded machine, the process might not receive the quit signal
in a timely manner, and this introduce false positive results.

Add a longer timeout. This shouldn't interfere with the global time
spent in the tests, but will allow some loaded environment to pass
the tests.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-08-07 14:28:22 +02:00
Benjamin Tissoires
1e98b7e843 gitlab-ci: force using docker format for the generated images
See https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/178#note_203050

Some shared runners are not capable of understanding OCI format for
container images, and they are failing.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-08-07 11:57:01 +02:00
Benjamin Tissoires
d5662590d4 gitlab-ci: allow to run on unprivileged containers
This parameter is already included by default in ci-templates, but
we also need it in freebsd

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-08-07 11:51:52 +02:00
Peter Hutterer
2c6e90f4be gitlab CI: fetch the WAYLAND_WEB_TOKEN from a file
This way it can't leak into the meson testlog.txt during the other stages.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-07 13:43:31 +10:00
Peter Hutterer
b1181bdd2f gitlab CI: replace the user:password with a netrc file
Gitlab supports masked tokens that get sanitized during log output but these
tokens are still in the environment. meson dumps the environment into
testlog.txt, resulting in our tokens leaking.

Avoid that leak by using a netrc file instead. The token value now refers to
the file name which is safe enough to leak into the test logs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-07 13:28:27 +10:00
Brian Ashworth
801485afda evdev: always store user calibration matrix
In evdev_device_calibrate, the user matrix was not being stored when it
was the identity matrix. This resulted in
libinput_device_config_calibration_get_matrix not providing the correct
matrix. Instead of giving the identity matrix, the last non-identity
matrix set was given.

This just moves the storage of the user matrix in
evdev_device_calibrate to be above the identity matrix early return so
that it always get stored.

Signed-off-by: Brian Ashworth <bosrsf04@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-05 09:58:06 +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
4ab8a51b68 tools: record: fix two memory leaks
Found by coverity.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-01 08:41:01 +10:00
Peter Hutterer
803519ae59 tools: record: fix segfault on exit
If we don't supply --with-libinput, the device is NULL so we can't unref it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-01 08:40:58 +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
057fd339d1 test: mix tablet events into touch arbitration tests
We keep running into the proximity timeout for these tests, especially under
valgrind. To avoid this, manually intersperse the touch events with tablet
events.

Note that this manual loop would just work even without tablet events
because we no longer have a 10ms delay between touch events as enforced by
litest_touch_move_to. But let's do the right thing anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-31 10:23:29 +10:00
Jason Gerecke
5521ab03f4 udev: Reproduce entire LIBINPUT_DEVICE_GROUP for paired ExpressKey Remote
In order for two devices to be in the same group, they need to share
identical LIBINPUT_DEVICE_GROUP attributes. The `wacom_handle_ekr` function
overwrites the VID/PID for an ExpressKey Remote, but the 'phys' path is
left unchanged. This only works if the EKR and the device we want to pair
it with are both direct sibings in the USB tree. It isn't always possible
to actually connect the devices like this, however. The Cintiq Pro 32 and
24, for instance, have multiple internal USB hubs and place the pen sensor
and the USB port for the EKR dongle behind different ones.

By copying the 'phys' path of the device we want to pair with, it is
possible to reproduce the entire LIBINPUT_DEVICE_GROUP and ensure that
the two devices actually end up paired in libinput.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
2019-07-29 22:38:36 +00:00
Jacob Moroni
7ee232a91d Introduce Dell Latitude 5580 trackpoint multiplier
It is required, otherwise the trackpoint is too sensitive.

Tested with a Dell Latitude 5580.

Signed-off-by: Jacob Moroni <mail@jakemoroni.com>
2019-07-27 20:26:16 -04:00
Peter Hutterer
9c2ac8f9ee tools: record: when running from the builddir, load the quirks correctly
Fixes #324

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-24 14:57:56 +10:00
Peter Hutterer
b436585b5e tools: handle arguments correctly for the YAML verifier tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-24 14:57:56 +10:00
Peter Hutterer
9807019096 tools: skip the event tests for eventless recordings in the YAML verifier
When verifying a recording, let's skip those tests that require events but
don't have any.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-24 14:57:36 +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
de2767b152 Merge branch 'wip/advanced-thumb-detection-v2' 2019-07-17 19:37:21 +10:00
Matt Mayfield
c284d4aaf0 touchpad: stricter thumb detection if no pressure/size 2019-07-17 09:33:14 +10:00
Matt Mayfield
35fd6e6c4e touchpad: don't detect speed-based thumbs if there's already a thumb 2019-07-17 09:33:14 +10:00
Peter Hutterer
94a7cd4959 doc/user: add documentation for the new thumb detection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-17 09:33:14 +10:00
Matt Mayfield
4536b5b38f touchpad: revamp thumb detection
Instead of a simple yes/no/maybe for thumbs, have a more extensive state
machine that keeps track of the thumb. Since we only support one thumb anyway,
the tracking moves to the tp_dispatch struct.

Test case changes:
touchpad_clickfinger_3fg_tool_position:
  with better thumb detection we can now handle this properly and expect a
  right button (2fg) press for the test case
touchpad_thumb_no_doublethumb_with_timeout:
  two thumbs are now always two fingers, so let's switch to axis events here

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-17 09:33:14 +10:00
Peter Hutterer
dda6f733af test: make the touchpad size the only check for thumb detection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-15 13:08:47 +10:00
Peter Hutterer
8e4d820efd test: only run the speed finger tests when the touchpad has thumb detection 2019-07-15 13:08:47 +10:00
Peter Hutterer
181f8d2ab5 test: only run the speed tests for clickpads
We don't need speed detection for non-clickpads - the only reason to ever drop
a second finger on those is to either scroll or trigger a gesture. Unlike
clickpads, where a dropped finger may be a thumb to click.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-15 13:08:47 +10:00
Peter Hutterer
f140826c86 touchpad: only log edge scroll state changes when the state actually changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-15 13:08:47 +10:00
Peter Hutterer
282979558e touchpad: add a helper function for supressing a thumb
Only sets the state to YES at the moment, will do more in the future.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-15 13:08:47 +10:00
Matt Mayfield
15c8613a65 gestures: Improve thumb detection, allow one finger scroll
Check if there's a thumb if we have two touches. If one finger moves but
the thumb remains still, we assume that one is really a thumb. But if the
thumb moves while the finger is still, let's assume this is a 2-finger scroll.

Extracted from Matt Mayfield's thumb detection patchset
2019-07-15 13:08:47 +10:00