Commit graph

3897 commits

Author SHA1 Message Date
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
Peter Hutterer
1dae79c833 gestures: fast-track scroll/swipe detection when gestures are off
We can't detect pinch when gestures are off anyway, so we don't need to check
the finger distances.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-15 13:08:47 +10:00
Matt Mayfield
93ab2f964a gestures: improvements to pinch detection
Only bias towards scrolling if the fingers are in the position past the
timeout.
2019-07-15 13:08:47 +10:00
Matt Mayfield
e97f054917 gestures: improve scroll responsiveness for vertically aligned touches
Put some basic location checks in, if the fingers are next to each other and
vertically close, assume scroll over swipe.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>:
2019-07-15 13:08:47 +10:00
Matt Mayfield
7b9a6a94a3 touchpad: basic thumb detection within gestures
When a touchpad has thumb detection enabled, avoid false-positive gestures
involving a resting thumb by using two thresholds: inner and outer.

While both touches remain inside their inner thresholds, remain in UNKNOWN
state to allow for accurate gesture detection even with no timeout.

If both touches move outside their inner thresholds, start a pinch or
swipe/scroll gesture according to direction, as usual.

If one touch moves outside its outer threshold while the other has not yet
exceeded its inner threshold, and thumb detection is enabled, then if one
touch is >20mm lower, mark it as a thumb and cancel the gesture.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-15 13:08:47 +10:00
Peter Hutterer
7fbfb14419 touchpad: rename the thumb detection methods
No functional changes, just prep work for a later patch where the thumbs will
dynamically update their state (instead of just using yes/no/maybe).

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
47d8f05d3b touchpad: extract some bits of thumb detection into helper functions
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
93a754c41c touchpad: move the speed-thumb detection code to the thumb helper file
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
117ef65087 touchpad: add helper function to reset a thumb's state
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
c2331ae11e touchpad: explicitly start with detect_thumbs as false
Not needed because we zalloc() anyway, but this makes it grep-able.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-15 13:08:47 +10:00
Peter Hutterer
d232e44c9f touchpad: add helper function for setting the thumb state
This moves the thumb state logging directly into that helper function too.

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
9e27244e6c touchpad: move tp_init_thumb and tp_thumb_detect to the thumb file
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
7c9ed03c42 touchpad: add a helper function for counting touches for gestures
Currently the same as tp_touch_active() but this will change.

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
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
7e89e43c74 touchpad: rename the scroll timeout define, drop the pinch one
The previously 'scroll'-named timeout is also used for swipe, so let's rename
it. And the pinch one isn't used at all.

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
43b910b1df touchpad: reduce state debugging output by only logging changed states
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-15 13:08:47 +10:00
Vladyslav Shtabovenko
91644086a1 Introduce Dell Latitude 5480 trackpoint multiplier. Otherwise the
trackpoint is too sensitive.
2019-07-11 11:20:32 +02:00
Peter Hutterer
f1873fae62 doc/user: fix a typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-10 14:44:23 +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
47cf7e0995 test: use the default job control for --filter-groups
All filter arguments currently force a -j1 unless otherwise specified. Change
this for --filter-group since that one is most likely invoked by some test
setup that can either add -j X or set the environment variable LITEST_JOBS as
well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-08 13:28:47 +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
734ada5e94 test: fix an always-true check for udev properties
Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-08 09:53:49 +10:00
Peter Hutterer
cc908b68a9 test: fix two coverity warnings
Alleged division by zero and use of an uninitialized variable. Both cannot
happen the way we call the tests, so let's just abort to make coverity happy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-08 09:47:31 +10:00
Peter Hutterer
6f6a9d95d5 test: drop the litest feature enum, make it normal bits instead
The coverity compiler can't handle 64-bit enums and since it does provide
useful data, let's switch this to #defines instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-08 09:44:12 +10:00
pixl
cc370f53c4 Fixed a grammar error 2019-07-05 05:14:31 +00:00
Peter Hutterer
345846729c test: one O_NONBLOCK is enough
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-01 12:18:13 +10:00
Peter Hutterer
d1af333546 quirks: add touchpad range for cypress touchpads
As found in the Dell XPS 12 9Q23

Fixes #310

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-28 11:27:13 +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