Commit graph

262 commits

Author SHA1 Message Date
Peter Hutterer
c5d6b3f6e8 Default branch is now main
To update your local repository, use these commands

    $ git fetch origin
    $ git checkout master
    $ git branch -m main
    $ git branch --set-upstream-to=origin/main

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-04-29 10:55:01 +10:00
Peter Hutterer
9477d91d69 libinput 1.17.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-23 19:02:45 +10:00
Peter Hutterer
6a6435ae4b tools: add a tool to print a libinput recording as a table
This makes it easier to visualize changes in various axes or key states that
should not be there, doubly so for long recordings.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-23 13:46:00 +10:00
Peter Hutterer
9323cdfc11 meson.build: build libinput replay as well
Just like the other python-based tools it's just a basename copy, so let's be
consistent here and have all tools perform that way.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-23 13:30:42 +10:00
Peter Hutterer
1b8dd97092 meson.build: consolidate all man pages
They all use the same configure_file() process, so let's do them all in a
loop.

Exceptions are the test-suite man page.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-18 01:00:53 +00:00
Peter Hutterer
82e974ef1d meson.build: drop the dummy config data and use copy: true instead
We require the meson version this was introduced in, so let's use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-18 01:00:53 +00:00
Peter Hutterer
115a8ff141 libinput 1.16.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-16 13:10:18 +10:00
Peter Hutterer
d3115f4875 test: drop the custom group names
The group names are forced by check (they are called suite names there) but
for our test suite they provide very little benefit. Much easier to just
use the filename a test is in as group name.

This removes the pure substring match for --filter-group, it's now fnmatch
only. group names are short enough that the typing isn't an issue and we don't
want to run tests twice (e.g. 'pad' is also in 'touchpad').

This patch caused #574 until it got fixed in d838e3a3a4

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-12 15:24:15 +10:00
Peter Hutterer
d1f900f764 Create /etc/libinput on install
Users that need to create the local-overrides.quirks are sometimes hesitant to
do so because /etc/libinput doesn't exist by default. Let's create it on
install.

Related #568

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 04:28:42 +00:00
Peter Hutterer
61e41df901 touchpad: disable the pressure axes wherever the resolution is nonzero
The kernel/udev set the pressure resolution to nonzero to indicate the value
is in a known scale (units/g). We use that information to disable the
pressure axis on such devices - real pressure cannot be translated to
contact size.

For the kernel patch see:
https://www.spinics.net/lists/linux-input/msg71237.html

Fixes #569

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-08 03:38:26 +00:00
Peter Hutterer
affc3d929a libinput 1.16.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-01 19:14:10 +10:00
Peter Hutterer
ff598741a9 tools: add a tool to analyze the finger count from a recording
Given a libinput recording, print the timestamps of any finger changes, i.e.
which slots are currently logically down. For example:

Timestamp | Rel time |     Slots     |
--------------------------------------
 0.000000 |  +0.000s | + |   |   |   |
 0.454631 |  +0.454s |   |   |   |   |
 5.065401 |  +4.610s | + |   |   |   |
 6.140281 |  +1.074s | + | + |   |   |
 7.410377 |  +1.270s |   | + |   |   |
 7.420200 |  +0.009s |   |   |   |   |
11.233108 |  +3.812s | + | + |   |   |
11.850206 |  +0.617s |   |   |   |   |
13.827740 |  +1.977s | + |   |   |   |
14.704027 |  +0.876s | + | + |   |   |
16.050577 |  +1.346s | + |   |   |   |
16.905186 |  +0.854s |   |   |   |   |

This data is available with the per-slot-delta tool but the output here is
more compressed, making it easier to detect stuck fingers. Pressure
thresholds are not currently supported.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-29 08:06:53 +10:00
Peter Hutterer
53595cb232 quirks: disable pressure on the Lenovo Yoga 9i touchpad
This touchpad is a true pressurepad and the pressure axis gives us physical
pressure down. Using it as contact size gives flaky touch detection, so let's
just disable the axis until we do something with that value.

Fixes #562

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-14 13:42:59 +10:00
Peter Hutterer
e882bd0216 quirks: add AttrInputPropEnable and Disable
The latter requires libevdev 1.10 but since that'll take a while to filter
into our various CI systems, let's make it conditional.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-23 13:35:50 +10:00
Peter Hutterer
e3c4ff3898 quirks: add AttrEventCodeEnable as counterpoint to the disable one
Currently unused, but let's get this in because we may need this very soon for
broken tablets.

Enabling EV_ABS axes requires an absinfo struct - we default to a simple 0-1
axis range for those as the most generic option. Anything more custom will
need more custom treatment when we need it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-23 13:35:50 +10:00
Peter Hutterer
f86d6a6e5a meson.build: add a few compiler warnings and make them compiler-conditional
These seem like a decent-enough set to have, only -Wlogical-op actually
produced a new warning.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 13:57:39 +10:00
Peter Hutterer
c6f87ade84 meson.build: drop the separate cpp flags
All we care about for C++ is that we build.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 13:57:39 +10:00
Peter Hutterer
ad2216b4c8 meson.build: bump minimum version to 0.47
It's been out for 2 years.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 12:36:28 +10:00
Peter Hutterer
5201ed8cc6 meson.build: update libwacom dependency to 0.27 or newer
Released in 2017, that's enough waiting

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 12:36:09 +10:00
Peter Hutterer
a62e2b14a2 Drop the trailing slash from the HTTP_DOC_LINK
It makes the printf statements nicer and we ne don't use it on its own
anywhere anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 11:36:07 +10:00
Peter Hutterer
d007a8155b meson.build: we no longer install a hwdb file, so drop the directory define
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 11:36:07 +10:00
Peter Hutterer
9fa57c6ef7 meson.build: drop a meson < 0.43 condition
We require meson 0.45, so this can no longer be triggered.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 11:36:07 +10:00
Peter Hutterer
852f7f8e03 meson.build: bump to 1.16.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-09 11:36:07 +10:00
Peter Hutterer
9dbfc700fe libinput 1.16.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-13 12:05:58 +10:00
Peter Hutterer
6d1f2f88d6 test: add two test devices for the false joystick labelling
Two devices that were affected by the regression fixed with #517

Test devices taken from:
https://gitlab.freedesktop.org/libinput/libinput/-/issues/514
https://gitlab.freedesktop.org/libinput/libinput/-/issues/515

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-13 11:02:33 +10:00
Peter Hutterer
af6fed94d8 libinput 1.16.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-03 15:37:49 +10:00
Peter Hutterer
13c3b008d0 libinput 1.15.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-27 15:36:24 +10:00
Peter Hutterer
c9ff7e78d9 libinput 1.15.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-15 09:36:48 +10:00
Peter Hutterer
f15da0f108 meson.build: don't install the quirks in a further 'quirks' subdirectory
install_subdir() by default also copies the 'quirks' directory, resulting in
the quirks files being in <datadir>/libinput/quirks/*.quirks as opposed to the
previous <datadir>/libinput/*.quirks.

Fixes 727dc44b04

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-01 10:57:20 +10:00
Peter Hutterer
727dc44b04 meson.build: use install_subdir() to install the quirks files
This removes the need to check whether the files were added in meson.build but
requires litest to traverse the source dir now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-17 07:52:00 +00:00
Peter Hutterer
4cf4aba3fb evdev: filter unreliable tablet mode switch events
If we know that the tablet mode switch is bogus anyway, filter the event and
don't pass it to the caller. They won't know whether it's bogus so the only
result we get here is buggy behaviour.

This is the simplest solution here, it filters the mode switch at the lowest
level and thus the caller won't know that the tablet even has a mode switch at
all. Where the device doesn't have any other switches it'll also lose the
switch capability.

This may cause issues in some niche cases where the event node only has
that one bit and we now disabled it leaving us with a zero-event bit device.
Shouldn't matter to callers, but let's see.

Fixes #491

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-06-03 22:32:56 +00:00
Evan Goode
034226d904 Allow the flat acceleration profile for touchpads
Signed-off-by: Evan Goode <mail@evangoo.de>
2020-05-27 06:21:00 +00:00
Peter Hutterer
4a9d3e8796 tools: add a measure touchpad-size tool
Replacement for the touchpad-edge-detector tool with a slightly more
expressive design, hopefully cutting down on some of the bug reports.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-30 15:14:45 +10:00
Martin Cihlář
4d42e9b9e2 add trust mouse quirk #455
Signed-off-by: Martin Cihlář <martin.cibule@seznam.cz>
2020-03-22 12:07:51 +01:00
Peter Hutterer
7814bcfed0 meson.build: bump to 1.15.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-22 10:51:01 +10:00
Peter Hutterer
b35a32dd9d man: install the analyze per-slot-delta man page
And add libinput analyze to the main libinput man page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-20 16:10:11 +10:00
Peter Hutterer
d0eb8d58a3 tools: switch tool option parsing test to use pytest
pytest is more powerful than unittest, so let's switch to that instead. And in
the process fix a few tests that for some reason succeeded even though they
shouldn't have (e.g. the autorestart test).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-17 10:08:48 +10:00
Peter Hutterer
e11bad41f5 tools: add a libinput analyze command with the per-slot-delta subcommand
I've been using this script ever since libinput record was available, might as
well ship it with libinput so I don't have to remember where it lives.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-16 08:35:43 +10:00
Peter Hutterer
a1c8909337 libinput 1.15.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-03-06 13:23:38 +10:00
Peter Hutterer
a3fb9bd7db libinput 1.15.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-20 11:21:16 +10:00
Peter Hutterer
0dcb02d369 test: add a test case for checking EVDEV_ABS overrides
Problem: it's still not a 100% check because the way real udev handles the
EVDEV_ABS overrides ignores any that are set through udev properties only. So
we manually have to trigger the keyboard builtin for our test device which
can give us false positives (e.g. it wouldn't have detected #424). But still,
it'll alert us if the actual overridden values are different to what we
expect.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-12 21:22:01 +10:00
Peter Hutterer
ac2cfea5d2 libinput 1.15.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-03 14:28:44 +10:00
Peter Hutterer
71830dd460 tablet: fix the handling of axis updates after a forced proximity out
Where a pen was forced out of proximity and an eraser came into proximity
without axis updates on the prox-in, subsequent axis updates would trigger the
pen back into proximity. This resulted in two tools in proximity at once
though the new pen never went out of proximity

This would trigger crashes in various compositors/applications, see
https://github.com/xournalpp/xournalpp/issues/1141#issuecomment-578362497

The cause was a wrong condition introduced in ffd8c71e4e. We only need to
force the pen bit on if the current tool state is currently zero and no tool
update was sent with the axis event. In our case, the tool state is nonzero
already (eraser) and we can skip this bit.

Fixes #418

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-02-02 23:46:14 +00:00
Peter Hutterer
eb6ef9fe70 touchpad: correct a wrong slot count by the kernel
alps.c hardcodes 5 slots in the kernel but some devices only provide 2 slots
plus BTN_TOOL_TRIPLETAP, etc. Fix this by counting active slots and when the
fake finger count exceeds the active slots but is still less than the number
of slots, adjust the slots themselves downwards.

And because the new test device messes with our slot count assumptions for the
various tests hardcode that one device to return 2 slots.

Fixes #408

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-29 15:58:49 +10:00
Peter Hutterer
4d15fdf3e8 libinput 1.15.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-03 16:44:03 +10:00
Peter Hutterer
565f9470ff meson.build: re-add missing trailing slash to the HTTP link
Got lost in 61f81ec93e

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-23 10:57:53 +10:00
Anatolii Lishchynskyi
970b5aff59 quirks: ignore mode switch button on Madcatz R.A.T.3 mouse
Avoid stuck buttons, so window managers won't behave buggy, for example:
* You click on one window, but click is emulated in another one
* You hover cursor over button/link but see no feedback
Based on quirk for Cyborg mouse.

Signed-off-by: Anatolii Lishchynskyi <iamnotacake@protonmail.com>
2019-12-11 09:45:49 +00:00
Peter Hutterer
8f0af85072 libinput 1.14.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-05 13:50:24 +10:00
Peter Hutterer
3ac525db19 test: write our test case results out as junit xml files
libcheck has the ability to write out XML files for test results, but
converting those into junit isn't ideal, for a number of reasons:
- junit xml is different to libcheck's xml, so not all data is available or
  useful. Especially with our litest wrappers around it.
- litest forking off tests means we have to wrap around everything anyway to
  avoid multiple forks writing to the same test file.

This is the minimal implementation since it's only user is likely the CI which
we control fairly tightly. So there are a few corners we can skip:
- no filename validation is performed by litest
- we write out a lot of junit xml files (one per litest fork). Rather than
  collating those we just rely on the CI to find the files.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 11:52:54 +01:00
Peter Hutterer
47767290a7 tools: print the libinput version in debug-events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 15:16:30 +10:00