Commit graph

4006 commits

Author SHA1 Message Date
Peter Hutterer
d20bbfa5cb tablet: handle a direct tool switch correctly
Fixes #259

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-31 23:27:39 +00:00
Peter Hutterer
bc461b0292 tablet: add a helper function to get the current tool
No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-31 23:27:39 +00:00
Peter Hutterer
12021c860e tools: debug-gui: show pressure/distance as vertical bar
Both of these are normalized so let's draw a bar that shows the values
accordingly. This makes it a lot easier to check whether pressure values go to
the maximum, etc.

A little extra square is shown whenever the tip is logically down.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 08:38:59 +10:00
Peter Hutterer
7bd96ec923 gitlab CI: split the qemu test runs up into multiple jobs
The tests are split by topic but have varying runtime. Specifically, the
longest test (touchpad) takes ~170s whereas many of the others can take less
than a second. Splitting them all up into separate VMs costs too much in
startup time so here's the middle ground of some custom grouping to make the
tests roughly run the same time.

This list will need to be manually maintained but given that groups are rarely
added anyway this shouldn't be too much of a maintenance burden. And bonus:
since the kvm tests often fail due to timing issues, re-running one is
significantly faster now.

This shaves about 8min of the CI run

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-31 15:53:36 +10:00
Peter Hutterer
b6343d0a3f gitlab CI: fix an indentation issue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-31 10:40:40 +10:00
Peter Hutterer
2f22580deb test: remove a useless assignment
copy/paste error that makes coverity unhappy. This is the code to correctly
release all touches and the buttons have already been processed above - no
need to reassign here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-30 10:43:18 +10:00
Peter Hutterer
3819b21967 test: silence a coverity warning
Coverity complains that we call libinput_event_destroy() twice on the variable
(once in and once just outside the condition). This is technically correct but
never true because we always break the loop early for the touch up/frame events.
Let's just reset the pointers so coverity is happy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-30 10:38:59 +10:00
Peter Hutterer
cfa06b6098 test: remove some useless code triggering a coverity warning
x/y assigned but never used. Dropping those few lines gets rid of the warning
and checks the coordinates correctly now too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-30 10:29:46 +10:00
Peter Hutterer
883e0a1eea tools: drop the specific libinput measure tools from the libinput man page
libinput measure lists them all anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-29 11:08:19 +10:00
Peter Hutterer
31dd2ba2f1 tools: correct libinput measure reference to the tap man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-29 11:08:19 +10:00
Peter Hutterer
454dd4a2cb test: make the test jobs dependent on the number of processors
Let's hope the test suite is more successful on puny VMs that way.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-29 08:01:00 +10:00
Konstantin Kharlamov
f3c132042e libinput-list-devices: make paragraph about different settings terser
Changes are:

1. "configuration options" is same as "options"
2. The clarification "e.g. scrolling" doesn't clarify anything because a
user don't necessarily knows there're "2-finger scroll" and
"edge-scroll"; and even if they do, they can imagine the settings to be
represented by "0" and "1" values, which then begs a question: why
aren't all "Enabled/Disabled" settings are prefixed with "*" too.
   Instead, replace the vague `multiple different settings` with more
specific `more settings than "enabled/disabled"`.
3. "ones" is shorter than "settings" and makes sure a user haven't lost
context.

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-10-28 05:40:02 +00:00
Konstantin Kharlamov
404e69e93b libinput-list-devices: be more explicit about only listing defaults
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-10-28 05:40:02 +00:00
Sven Slootweg
f312cb803c quirks: add RollerMouse Free 3 for double-click fix 2019-10-26 16:04:05 +00:00
Peter Hutterer
b05e77e7f1 gitlab CI: switch to Ubuntu 19.10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-25 10:32:03 +10:00
Peter Hutterer
159dbb8d98 gitlab CI: switch to Fedora 31
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-25 10:32:03 +10:00
Peter Hutterer
8a75da773e udev: fix potential memory leak for the phys string
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-24 14:27:37 +10:00
Peter Hutterer
727a504e0d fallback: fix a coverity warning
Value stored to 'rect' during its initialization is never read

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-24 14:10:47 +10:00
Peter Hutterer
8011d991fe doc/user: add a faq entry about the pointer acceleration "issue"
Despite many bits wasted on reddit, phoronix, lwn etc. no-one seems interested
in actually fixing this for their device, so let's at least add a FAQ entry.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-23 08:00:44 +10:00
Peter Hutterer
17ec6ac79d doc/user: reword one of the FAQ entries to no tmake it read outdated
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-22 12:04:04 +10:00
Peter Hutterer
9ed14e0667 gitlab CI: add an alpine image
Alpine uses musl, eudev and elogind, so it's useful to build on that to get
those covered.

Notably, ninja test is not run because the litest-selftest will fail for
tcase_add_exit_test() and tcase_add_test_raise_signal(). This may be due to
some missing bits in musl or check not using the feature test macros, etc.
Someone with time and motivation to have this actually work on musl can figure
that out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-17 10:56:33 +00:00
Peter Hutterer
6f3e51faf6 quirks: make the diff call for the meson check more portable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-17 10:56:33 +00:00
Peter Hutterer
cbd31c89e9 doc/user: actually link to the API documentation
a6082d3a6f only included the base link

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-17 19:50:53 +10:00
Peter Hutterer
df0be64baa doc/user: add a link to the API documentation in the TOC
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-17 08:31:28 +00:00
Peter Hutterer
61f81ec93e meson: move HTTP doc url generation to here
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-17 08:31:28 +00:00
Peter Hutterer
63f9923013 Add a scroll button lock feature
Scroll button locking is an accessibility feature. When enabled, the scroll
button does not need to be held down, the first click holds it logically down,
to be released on the second click of that same button.

This is implemented as simple event filter, so we still get the same behavior
from the emulated logical button, i.e. a physical double click results in a
single logical click of that button provided no scrolling was triggered.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-17 12:21:41 +10:00
Luflosi
12eb14846a
doc: fix sentence
Signed-off-by: Luflosi <luflosi@luflosi.de>
2019-10-16 14:58:21 +02:00
Peter Hutterer
f392766155 fallback: don't send a single-touch motion if we just sent a begin
Any touch down event will also provide motion data, but we must not send a
motion event for those in the same frame as the down event.

Fixes #375

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-16 03:43:45 +00:00
Balazs Endresz
8c92328dc5 Fix horizontal scrolling for Logitech MX Master 3 on bluetooth 2019-10-15 10:50:32 +02:00
Peter Hutterer
44b5fea14e CI: UI improvements
This should not change the overall time, but allows for a nicer
UI when looking at the pipelines:

* first "check" icon is the container_prep stage
* second icon is all of the variations of builds
* third is the full test suite in the VM
* forth is the distribution specifics
* last one is the deploy

This allows to see which step fails from the UI instead of having
a lengthy list of jobs all in the same column.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-10-14 12:01:12 +02:00
Peter Hutterer
16ad7cca28 gitlab CI: run the valgrind test suite as well
Separate instance so we can speed things up a bit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-14 14:15:16 +10:00
Peter Hutterer
2b33445bc9 touchpad: use the same speed for scrolling as the baseline of the accel curve
Scrolling and gestures use unaccelerated motion. The idea behind it was that
at least for the default speed setting of 0, the accelerated speed and
unaccelerated speed are identical where meaningful.

The touchpad speed curve has a plateau for 'normal' speeds (i.e. not very slow
and not very fast) where the acceleration factor is constant. This is the
reference factor that the unaccelerated motion should use as well.

Since the touchpad acceleration rework in d6e5313497 the reference factor is
0.9 * TP_MAGIC_SLOWDOWN (previously the factor was 1.0 * TP_MAGIC_SLOWDOWN)
and scroll motion is thus 10% faster than the pointer movement at the default
speeds. Let's fix this and let the two match up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-14 02:57:48 +00:00
Aleix Pol
c20d08ac23 LIBINPUT_EVENT_TABLET_BUTTON doesn't exist, use LIBINPUT_EVENT_TABLET_PAD_BUTTON 2019-10-11 02:37:39 +02:00
Tadeo Kondrak
0e19d2c329
meson.build: fix building as a subproject 2019-10-07 01:04:21 -06:00
Peter Hutterer
f37a712ca2 util-time: include linux/input.h
struct timeval isn't defined in time.h, at least not on musl. And since we
need that value for struct input_events, let's include the header for that
struct. That'll sort out the includes for free.

Fixes #371

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-05 07:14:25 +10:00
Benjamin Tissoires
779ce028c3 gitlab-ci: use one sha1 instead of duplicates
because we can

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-10-04 15:03:50 -04:00
Benjamin Tissoires
60595e1cbb gitlab-ci: use qemu to run the full test suite
We currently allow the stage to fail, but at least,
we can make use of it.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-10-04 20:02:33 +02:00
yy
863aa2b706 Added quirk for Lenovo ThinkPad X200 Tablet. 2019-10-04 19:07:34 +02:00
Jakub Schmidtke
8490384c68 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.
2019-09-30 23:34:45 +00:00
Peter Hutterer
df7b82588d test: fix a coverity warning about an unused value
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-30 11:18:27 +10:00
John Chadwick
8568cf1b3a tablet: Improve forced prox out behavior.
Some graphics tablets (most or all Wacom, for example) do not emit
proximity out events when the tablet pen goes out of range. To
compensate for this, libinput synthesizes proximity out events when no
events are received for a certain period of time. Unfortunately, on some
tablets, this is fairly failure prone when moving the pen slowly. As a
workaround, this patch causes libinput to avoid synthesizing proximity
out events when the pen is still in contact with the tablet pad, as
defined by the TABLET_TOOL_IN_CONTACT status.
2019-09-29 23:35:09 +00:00
Peter Hutterer
a5c6571ed0 middle-button: add space to middlebutton state debug message
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>`
2019-09-27 17:24:33 +10:00
John Chadwick
b71a1b6e2d 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`.
2019-09-26 20:06:11 -07:00
Peter Hutterer
67151ddcf5 test: don't use debounced clicks for the middle button emulation click
This used to work under valgrind up to F30 but with the F31 beta something is
now a tad slower so it triggers the timeouts before the middle emulation kicks
in.

The middlebutton timeout is 50ms and the first debounce timeout is 30ms, so if
we're late by 20ms, well, there goes the timeout.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-25 16:49:08 +10:00
Peter Hutterer
058e198067 doc/user: drop markdown source parsers
This is deprecated in sphinx 1.8 but we don't include any markdown sources
anyway, so let's just drop it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-25 15:49:58 +10:00
Peter Hutterer
6a3bd50f94 doc/user: update copyright for the sphinx docs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-25 15:49:36 +10:00
Peter Hutterer
b38722317c doc: update reference to the event codes header
The codes have been in input-event-codes.h for quite a few releases now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-25 15:16:45 +10:00
Peter Hutterer
cb1be90439 gestures: where we have more fingers than slots, default to swipe
Fixes #360

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-25 04:10:02 +00:00
Peter Hutterer
129a1dffa4 gestures: rename the inner/outer thresholds to min/max_move
inner/outer refer more to static thresholds when really what we have here is a
minimum movement before we look at the touch, and a maximum one after which
it's largely ignored.

Straight-up rename, no functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-25 04:10:02 +00:00
Peter Hutterer
0ce06d1314 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>
2019-09-25 04:10:02 +00:00