Commit graph

3946 commits

Author SHA1 Message Date
Konstantin Kharlamov
ed698fbab5 evdev-mt-touchpad-buttons.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-13 00:07:39 +03:00
Konstantin Kharlamov
fae8b9e14a filter.h/c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-13 00:07:39 +03:00
Konstantin Kharlamov
25358feef6 libinput-fuzz-override.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-13 00:07:39 +03:00
Peter Hutterer
7126823fe1 meson.build: bump to 1.14.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-12 11:10:34 +10:00
Konstantin Kharlamov
25f7d85bb3 timer.c: remove unused include <inttypes.h>
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
dec003e6bd evdev-tablet-pad-leds.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
8f278e69c2 evdev-tablet.c: remove unused include
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
c29fabb2cf evdev-mt-touchpad-gestures.c: remove unused include
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
cad74b7451 evdev-mt-touchpad-edge-scroll.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
b825b0f1af evdev-mt-touchpad-tap.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
48366f4aab evdev-mt-touchpad.h: remove unused include
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
27324e006f evdev.c: remove unused include
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
4b219c03ac filter-trackpoint.c: remove unused include
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
0ae4032e85 filter-touchpad-x230.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
23f7a2647d filter-touchpad.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
832c59855d filter-mouse.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
22c044c1dd filter-low-dpi.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Konstantin Kharlamov
a3857b4bec filter-flat.c: remove unused includes
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-09-12 09:36:40 +10:00
Peter Hutterer
e7a9c07ffe udev: parse the EVDEV_ABS properties for a potential fuzz setting
Where a fuzz is defined in the 60-evdev.hwdb, we rely on a udev builtin to
set the kernel device to that fuzz value. Unfortunately that happens after our
program is called with this order of events:
1. 60-evdev.rules calls IMPORT(builtin) for the hwdb which sets the EVDEV_ABS_*
  properties. It also sets RUN{builtin}=keyboard but that's not invoked yet.
2. 90-libinput-fuzz-override.rules calls IMPORT{program} for our fuzz override
  bits. That sets the kernel fuzz value to 0 and sets the LIBINPUT_FUZZ_*
  propertie
3. The keyboard builtin is run once all the rules have been processed.

Our problem is that where the fuzz is set in a hwdb entry, the kernel fuzz is
still unset when we get to look at it, so we always end up with a fuzz of zero
for us and a nonzero kernel fuzz.

Work around this by checking the EVDEV_ABS property, extracting the fuzz from
there and re-printing that property without the fuzz. This way we ensure the
kernel remains at zero fuzz and we use the one from the hwdb instead.

Fixes #346

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 12:24:02 +10:00
Peter Hutterer
1e6802b91b Remove some usage of libinput-util.h
Positive side-effect - this exposed a bunch of missing #includes that got
pulled in by other headers before.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 12:23:06 +10:00
Peter Hutterer
c84366e85e Split utility functions into separate source files
libinput-util.h is getting a bit of a catchall bucket and it includes things
like libinput-private.h which in turn includes libwacom. This makes
libinput-util.h less useful for bits that only need e.g. the string processing
utilities.

So let's split them all up in to separate files, to be used as-needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 12:23:04 +10:00
Peter Hutterer
00f3345b80 test: do run the util tests under valgrind
These tests include string parsers, definitely want those to run under
valgrind to detect OOB reads and writes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 12:21:44 +10:00
Peter Hutterer
27632555e1 tools: flake8 fixes for the various python files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 12:02:58 +10:00
Peter Hutterer
975ff2fb6e tools: change python invocations to use /usr/bin/env python3
Let's be consistent here

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 12:02:58 +10:00
Peter Hutterer
bd8123e459 tools: install local quirks during libinput replay
The quirks for each device are listed in the recording but they may not apply
during libinput replay (e.g. for DMI matches). Work around this by writing out
the local-overrides.quirks file before initializing the devices. This way
we're guaranteed that the device is identical as on the reporter's machine.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 09:41:46 +10:00
Peter Hutterer
93e91536db tools: make an infinite loop more obvious in the code
Nothing sets "stop", so we might as well make it a while True

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 09:13:36 +10:00
Peter Hutterer
73849515ef tools: factor out a sanity check in libinput-replay
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-11 09:13:36 +10:00
Richard McIntosh
4f9a795765 Added magic trackpoint multiplier for Thinkpad 13 G2 2019-09-08 15:21:11 +02:00
RussianNeuroMancer
8635d546ce Mark HP Elite x2 1013 G3 keyboard as external
Keyboard+touchpad is external:
http://h10032.www1.hp.com/ctg/Manual/c06077534 (page 12)
2019-09-03 08:02:28 +00:00
RussianNeuroMancer
3c13dd9ccd 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)
2019-08-30 15:09:01 +00: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