Commit graph

3199 commits

Author SHA1 Message Date
Peter Hutterer
a7d19e44db Remove circle.yml
This has been replaced with the GitLab CI in the repository proper. Circle CI
was ony ever run on a private github repo.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 11:00:23 +10:00
Peter Hutterer
2dfe27af25 Merge branch 'wip/quirks-fixes' 2018-06-18 10:55:27 +10:00
Peter Hutterer
d3cb40e914 data: don't disable the keyboard on any Thinkpad Yoga models
These (probably) all disable the mechanical keyboard anyway, so let's keep it
enabled to be able to access the screen keys, if any.

https://gitlab.freedesktop.org/libinput/libinput/issues/39

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 10:34:25 +10:00
Peter Hutterer
b20f6c2330 data: add the alps firmware version LUT
Just in case we need it

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 10:34:25 +10:00
Peter Hutterer
0bb30e5d3e data: put a 'do not edit' warning into all data files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 10:34:25 +10:00
Peter Hutterer
d3633aac24 data: add ALPS v8 trackpoint range
Got lost in the hwdb to quirks conversion

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 10:34:25 +10:00
Peter Hutterer
21ece0ce79 data: re-add the ALPS v8 size hint
Got lost in the udev to quirks file conversion

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 10:34:25 +10:00
Peter Hutterer
31e349fb5b data: switch alps touchpad matching to the bus/vid/pid matching
PSMOUSE_ALPS is 0x8

https://gitlab.freedesktop.org/libinput/libinput/issues/30

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 10:34:25 +10:00
Peter Hutterer
a57d35a1aa quirks: add MatchVersion in addition to VID/PID
Needed for the ALPS firmware detection in #39

https://gitlab.freedesktop.org/libinput/libinput/issues/39

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 10:34:16 +10:00
Peter Hutterer
cb7c9e596f data: re-add the IBM X41 quirk
Was merged while the config branch was ongoing and got lost in the process.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 10:33:01 +10:00
Benjamin Tissoires
8f3a8a5302 CI: Hook up GitLab CI
The main tasks it does is build on a few different distros as well as build
with the various build options to make sure they work.It doesn't (yet) run the
test suite runner because that one mostly requires device nodes to operate on.

Most of the fancy is to get the docker images ready. A dnf update takes
forever, so we don't want to do that on 10 different machines. So instead we
build docker images with all the bits pre-installed, push that to the registry
and use those images for testing.

To speed things up, we only do that when the current image is older than a
week. And we only do that when we push to libinput proper, so a merge request
or pushing to your private gitlab repo will never trigger a docker image
update - it will trigger the tests and use the docker images tough.

Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-06-18 00:24:45 +00:00
Peter Hutterer
a5700dcf43 tools: measure touchpad-pressure: prevent division by zero
And make sure the equivalent entry in the measure touch-size is long enough to
overwrite the current status line

https://gitlab.freedesktop.org/libinput/libinput/issues/42

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-18 08:52:21 +10:00
Konstantin Kharlamov
734496d972 touchpad: ignore motion on finger-up
Ignore motion when pressure/touch size fell below the threshold, thus
ending the touch.

Real world significance: subjectively scrolling/cursor positioning with
a touchpad now a bit better on SAMSUNG NP305V5A laptop.

https://gitlab.freedesktop.org/libinput/libinput/merge_requests/4

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2018-06-15 10:10:13 +10:00
Peter Hutterer
0d6dea5d8f quirks: use realloc instead of reallocarray
The latter requires libbsd and for that one call it's not worth it

https://gitlab.freedesktop.org/libinput/libinput/issues/40

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-15 08:01:53 +10:00
Peter Hutterer
20ccb81726 test: fix a test device section name
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-14 15:54:02 +10:00
Peter Hutterer
1ab2ef40ea test: fix the input_id struct for the ALPS touchpad
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-14 15:22:38 +10:00
Peter Hutterer
d4a91c0a00 meson.build: always build some tests
Make the meson -Dtests=false option only apply to the libinput test suite
itself which has extra dependencies, etc. The build tests and symbol leak
tests should always run.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-14 15:07:15 +10:00
Peter Hutterer
465c3eaf99 data: add pressure range/palm threshold for the Dell XPS13 9333
https://gitlab.freedesktop.org/libinput/libinput/issues/37

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-14 10:05:10 +10:00
Peter Hutterer
0a13223c39 tools: fix grab argument passing for libinput debug-events
The &grab pointer we used to pass as userdata was the address of the function
argument which goes out of scope at the end of the function. This works fine
for devices immediately opened but when a device connects later, the address
may have been re-used since and it's content is undefined. If not NULL, we
end up grabbing the device.

Instead pass the grab option in which is guaranteed to live until the end of
main.

https://gitlab.freedesktop.org/libinput/libinput/issues/26

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-14 09:50:29 +10:00
Peter Hutterer
50ca923c5f Move CODING_STYLE to markdown
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-14 08:45:56 +10:00
Konstantin Kharlamov
a23414dd1f touchpad: replace last_point with history.samples
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2018-06-14 08:31:30 +10:00
Peter Hutterer
da3e4ccb6b meson.build: bump to 1.11.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-13 15:45:27 +10:00
Peter Hutterer
c8084a7d58 circleci: drop the separate libsolv update
This was a F26 bug that is well and truly in stable by now
https://bugzilla.redhat.com/show_bug.cgi?id=1483553

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-13 15:22:24 +10:00
Peter Hutterer
000ac14c27 Merge branch 'wip/config-files' 2018-06-11 13:45:50 +10:00
Peter Hutterer
b4ff592a5a tools: libinput-record: put extra guard in to protect from OOB access
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-11 13:43:40 +10:00
Peter Hutterer
8865d4a29d util: abort for a negative zalloc() size
Nothing in libinput needs large buffers, so if we ever get something that
large, we probably passed a negative number to zalloc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-11 13:43:40 +10:00
Peter Hutterer
24a19dd167 util: put limits on how many strings we join
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-11 13:43:37 +10:00
Peter Hutterer
6ad928a1b6 util: add null string test handling to strv_join
Make it return NULL for a string array in the form of [ NULL ], like the docs
say. This also adds an extra safety check for the joiner to be of a reasonable
length to avoid overflows.

Found in
https://gitlab.freedesktop.org/libinput/libinput/issues/26#note_6320

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-11 13:43:15 +10:00
Peter Hutterer
46b64c7363 touchpad: don't pair external touchpads with lid/tablet mode switches
https://gitlab.freedesktop.org/libinput/libinput/issues/29

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-11 00:34:03 +00:00
Peter Hutterer
d0fa740ad9 Hook up list-quirks --validate for the test suite
All the tests fill fail anyway if the validation fails but this is a quick way
to fail everything early.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:37:22 +10:00
Peter Hutterer
b926497cc6 quirks: add the devicetree implementation
Using the compatible string

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:37:22 +10:00
Peter Hutterer
639ed0b641 Switch from udev property parsing to the quirks system
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:37:22 +10:00
Peter Hutterer
33341ddd20 libinput: initialize the quirks subsystem
A bit quirky (haha), because we cannot do this during context creation - we
really want any parsing error messages to show up in the right log file and
the log handler isn't set up during context creation. So we do it on the first
real call to the backend - path_add_device or udev_assign_seat.

Also, failure to initialize the quirks subsystem just means we continue as
normal. This shouldn't be a hard failure, it just means a lot of devices won't
work properly.

If the LIBINPUT_DATA_DIR environment variable is set, that directory is used
for the data file. Only that directory, no custom override file in that case.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:37:22 +10:00
Peter Hutterer
12b07229d8 test: switch the udev tag tests to be quirk tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:37:22 +10:00
Peter Hutterer
a50e13d50f test: init the quirks once per test suite run
So we have them available per litest device and can check in tests for certain
quirks to be present.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:37:17 +10:00
Peter Hutterer
5e4dee22fd test: install per-test device quirks files
These will replace the custom udev rules we currently have in place.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:33:35 +10:00
Peter Hutterer
3ce70cfa91 quirks: allow for in-line comments
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:33:35 +10:00
Peter Hutterer
fc6e6aad36 quirks: use an empty dmi modalias string for the test suite
We don't want any of the test devices to match the local machine's DMI
modalias. This was a major drawback in the previous test suite, hacking the
dmi modalias string was nontrivial but a wrong string could cause false
positives or negatives.

The quirks system is internal, so rather than having some fancy API we just
hook it off the environment variable that the test suite always sets. Hacky,
but a lot easier than the other options.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:33:35 +10:00
Peter Hutterer
5792af9a5f Implement a quirks system to replace the udev property parsing
Previously, we had all extra device information ("This is an Apple Touchpad",
"This touchpad causes pointer jumps", etc.) in the udev hwdb. The problem with
the hwdb is that updating it is nontrivial for the average user and debugging
when things go wrong is even harder. Plus, the hwdb has a matching scheme that
is unpredictable unless one is familiar with the implementation.

This patch set moves the hwdb entries into .ini style text files, with a
simple line-based parser. A new libinput list-quirks tool can list the quirks
applied to any given device, in --verbose mode it prints all matches as they
apply or not apply.

The data files are currently unused by libinput, that comes in a later patch.
They're installed though, the defaults point to the /usr/share/libinput
directory and for *temporary* local overrides the single file
/etc/libinput/local-overrides.quirks.

Failure to parse any file is a hard failure for the quirks system, but if the
local override file doesn't exist that's fine.

THIS IS NOT A CONFIGURATION INTERFACE! None of these settings are exposed via
the libinput_device_config_* calls. There is no API guarantee for these files,
think of them as source code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:33:35 +10:00
Peter Hutterer
845e912527 udev: remove duplicate Chromebook Falco hwdb entry
We can expand the first one and re-use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 13:47:33 +10:00
Peter Hutterer
be647fbb0d util: add a safe_atou() as unsigned equivalent to safe_atoi()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 13:47:33 +10:00
Peter Hutterer
e05fa8444a util: add a list_append()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 13:47:33 +10:00
Peter Hutterer
c81809d0aa test: remove created directories too
If we created it, remove it again. No change because we're not adding any of
the directories yet.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 13:47:33 +10:00
Peter Hutterer
4738c5cde5 test: make litest_copy_file copy normal files too
Make the tempfile creation dependent on whether the required template is
present. Currently unused, this is just prep work for future patches.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 13:47:33 +10:00
Peter Hutterer
66d8c79e16 COPYING: change a cgit to a gitlab URL
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-06 11:17:54 +10:00
Peter Hutterer
1c325e988f tools: drop the publish-doc tool
libinput docs must be pushed to wayland's web git repository now

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-06 11:15:38 +10:00
Daniel Stone
94dba68f96 doc: Fix URLs for GitLab, HTTPS
The GitLab migrations means that bugs should now be reported there
rather than Bugzilla. Though the repository is still available via
anongit, cloning through GitLab allows use of HTTPS.

All freedesktop.org URLs are also preferentially served over HTTPS
rather than unsecured HTTP.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2018-06-05 11:07:16 +01:00
Peter Hutterer
483123d490 filter: cap trackpoint scale factor at 1.0
Otherwise we scale up lower-resolution trackpoints' movements, resulting in a
jumpy cursor.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-05 10:45:07 +10:00
Peter Hutterer
07eefba84b udev: the IBM X41 Tablet must not disable the keyboard in tablet mode
https://bugs.freedesktop.org/show_bug.cgi?id=106799

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-05 10:44:53 +10:00
Peter Hutterer
3b9c665357 libinput 1.11.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-04 10:16:55 +10:00