Peter Hutterer [Thu, 10 Sep 2020 22:39:52 +0000 (08:39 +1000)]
test: don't run the tool switch test on tablets that require forced prox out
This test only worked because we're emulating events that the device never
sends that way. Just skip the test, devices that require a forced prox out
probably don't handle (or even have) erasers ayway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 10 Sep 2020 05:41:01 +0000 (15:41 +1000)]
test: remove duplicate tool type
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 9 Sep 2020 02:54:32 +0000 (12:54 +1000)]
tablet: group the pressure related bit into a substruct
No functional changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 17 Sep 2020 02:31:29 +0000 (12:31 +1000)]
tools/record: compress a set of printfs into one
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 17 Sep 2020 01:08:59 +0000 (11:08 +1000)]
tools/record: prefix the device list with a # character
Too many recordings end up with the device list at the top when users redirect
stderr and stdout to the recordings file. This breaks yaml parsing and
requires manual removal of the first few lines.
Avoid this by prefixing the lines with a command character, this way the yaml
stays correct.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 13 Sep 2020 21:58:04 +0000 (07:58 +1000)]
tools/record: add --grab option
Useful to record devices like power buttons, lid switches, etc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
weizhixiang [Tue, 15 Sep 2020 08:03:44 +0000 (16:03 +0800)]
check return value for libudev/udev_monitor_filter_add_match_subsystem_devtype
Signed-off-by: weizhixiang <1138871845@qq.com>
weizhixiang [Wed, 16 Sep 2020 05:13:34 +0000 (13:13 +0800)]
remove extra parameter in path_disable_device()
Signed-off-by: weizhixiang <1138871845@qq.com>
weizhixiang [Tue, 15 Sep 2020 02:23:38 +0000 (10:23 +0800)]
check return value for udev_new()
Signed-off-by: weizhixiang <1138871845@qq.com>
Peter Hutterer [Wed, 9 Sep 2020 00:50:42 +0000 (10:50 +1000)]
tools/replay: check the recorded udev properties against the local properties
Where a device is replayed locally for testing, its udev properties should
match the recorded properties. Otherwise the testing results will not be
reliable.
The exception here is the device group which we currently don't set for
emulated devices and even if we did, it may intentionally differ anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 9 Sep 2020 01:53:12 +0000 (11:53 +1000)]
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>
Peter Hutterer [Wed, 9 Sep 2020 01:56:54 +0000 (11:56 +1000)]
timer: fix a logic error checking the list node
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 9 Sep 2020 01:55:57 +0000 (11:55 +1000)]
quirks: fix a logical error checking for A..Z
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 9 Sep 2020 01:42:17 +0000 (11:42 +1000)]
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>
Peter Hutterer [Wed, 9 Sep 2020 01:26:25 +0000 (11:26 +1000)]
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>
Peter Hutterer [Wed, 9 Sep 2020 01:22:24 +0000 (11:22 +1000)]
doc/api: drop the doxygen/graphviz version checks
Both of our minimum versions were released in 2012, no more need to check.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 18 Jun 2020 04:32:56 +0000 (14:32 +1000)]
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>
Peter Hutterer [Wed, 9 Sep 2020 01:17:12 +0000 (11:17 +1000)]
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>
Peter Hutterer [Wed, 9 Sep 2020 01:14:41 +0000 (11:14 +1000)]
meson.build: we no longer install a hwdb file, so drop the directory define
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 9 Sep 2020 01:13:39 +0000 (11:13 +1000)]
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>
Peter Hutterer [Wed, 9 Sep 2020 01:29:02 +0000 (11:29 +1000)]
meson.build: bump to 1.16.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
weizhixiang [Fri, 4 Sep 2020 06:55:10 +0000 (14:55 +0800)]
remove extra paramenter in libinput-debug-events
Signed-off-by: weizhixiang <1138871845@qq.com>
Peter Hutterer [Wed, 26 Aug 2020 01:59:47 +0000 (11:59 +1000)]
touchpad: ignore the ALPS jump to 4095/0
Some ALPS touchpad send the occasional 4095/0 event on slot 1 during
two-finger interaction before snapping back to the actual position of the
finger. There doesn't seem to be a specific heuristic to predict this so let's
hardcode those values. When detected, overwrite the current touch point with
the position of the last point. This will likely cause a small pointer jump
when the finger later moves to the real position but based on #492 this could
be a second later, so all bets are off anyway.
Fixes https://gitlab.freedesktop.org/libinput/libinput/-/issues/492
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 3 Sep 2020 23:54:49 +0000 (09:54 +1000)]
doc: fix a wrongly named parameter
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Rosen Penev [Thu, 27 Aug 2020 08:17:24 +0000 (01:17 -0700)]
[clang-tidy] do not use else after return
Found with readability-else-after-return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Rosen Penev [Thu, 27 Aug 2020 08:00:31 +0000 (01:00 -0700)]
[clang-tidy] fix inconsistent declarations
Found with readability-inconsistent-declaration-parameter-name
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Rosen Penev [Thu, 27 Aug 2020 07:58:40 +0000 (00:58 -0700)]
[clang-tidy] remove pointless return in void function
Found with readability-redundant-control-flow
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Peter Hutterer [Sun, 23 Aug 2020 22:31:21 +0000 (08:31 +1000)]
tools: fix a replay exception when a recording has an empty quirks list
Fixes https://gitlab.freedesktop.org/libinput/libinput/-/issues/520
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 20 Aug 2020 04:46:50 +0000 (14:46 +1000)]
gitlab CI: drop Fedora 30
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Alyssa Ross [Sat, 15 Aug 2020 17:53:51 +0000 (17:53 +0000)]
quirks: add Google Pixelbook (eve)
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Peter Hutterer [Thu, 13 Aug 2020 02:05:39 +0000 (12:05 +1000)]
libinput 1.16.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Aug 2020 23:37:30 +0000 (09:37 +1000)]
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>
Peter Hutterer [Wed, 12 Aug 2020 23:59:10 +0000 (09:59 +1000)]
include: update event codes to v5.8
SW_MAX changed and the device_capability_nocaps_ignored test will fail on
older kernels. Change that test to use some other unhandled-by-libinput switch
code instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Aug 2020 23:40:27 +0000 (09:40 +1000)]
evdev: remove now-misleading comment
libwacom has been removing ID_INPUT_JOYSTICK for years
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Aug 2020 23:40:03 +0000 (09:40 +1000)]
Revert "evdev: fix the check for tablet vs joystick"
There are a number of devices that have the ID_INPUT_JOYSTICK tag set by udev,
usually because of seemingly random event codes set. We cannot rely on
ID_INPUT_JOYSTICK to be accurate enough.
Fixes #517
This reverts commit
eededbeb7faa2b6182c02a84884f54c1cb1d8a2a.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
haarp [Tue, 11 Aug 2020 16:51:05 +0000 (16:51 +0000)]
Add original MX Master to inverted-horizontal-wheel-having mice.
with help from
https://github.com/libratbag/libratbag/blob/master/data/devices/\
logitech-MX-Master.device
Signed-off-by: haarp <main.haarp@gmail.com>
Peter Hutterer [Mon, 3 Aug 2020 05:37:49 +0000 (15:37 +1000)]
libinput 1.16.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Aug 2020 05:23:51 +0000 (15:23 +1000)]
test: semi-fix the switch_suspend_with_touchpad test
This used to do nothing, now at least it does the same thing as the
corresponding keyboard test. It merely tests the switch going on/off while a
touchpad is present, so short of an unexpected error message or a crash this
test doesn't actually test for any specific behavior.
Fixes #502
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diego Abad A [Mon, 27 Jul 2020 13:37:10 +0000 (08:37 -0500)]
FIX: typo on building documentation
Signed-off-by: Diego Abad <dabada83@gmail.com>
Peter Hutterer [Mon, 27 Jul 2020 05:36:24 +0000 (15:36 +1000)]
libinput 1.15.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 15 Jul 2020 00:02:20 +0000 (10:02 +1000)]
gitlab CI: build an rpm package to verify the installed file list
This is not a package intended for, it's a job to fail when we accidentally
change the file list. An rpmbuild job like this was what detected
f15da0f10890467712222410233c0bec9faefdd0.
The spec file resembles the Fedora one but has BuildRequires removed (we rely
on the container for that).
The same task could be achieved by keeping a file list and comparing the
installed tree but since I had the rpm spec file already, let's use that for
now.
This requires meson 0.55 which hit F32 yesterday.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 22 Jul 2020 00:46:53 +0000 (10:46 +1000)]
gitlab CI: remove a bunch of trailing spaces
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 12 Jul 2020 22:21:19 +0000 (08:21 +1000)]
touchpad: disable jump detection on the Lenovo X1 Gen6 touchpad
This touchpad has firmware that seems to buffer events. In the words of the
reporter:
In usage, it feels like motions vary between smooth and choppy; slow
movements are smooth and quick movements are choppy. It's as if the
touchpad aggregates quick movements and sends one big movement instead
of sending discrete events. To make the movement more natural, the
events preceding the jump should be of higher magnitude and the jump
less pronounced, but that's just not how the touchpad works, it seems.
In the actual event data this looks exactly like a pointer jump: small
movements, one big one, then small ones again. If we filter that large
movement out we prevent the user from moving quickly.
There's no way to detect this or work around this, so let's add a quirk that
disables the jump detection for this device.
Fixes #506
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Jul 2020 22:11:17 +0000 (08:11 +1000)]
quirks: correct modalias for the Lenovo X1 Gen6
From commit
74e20e0ae01170fdc967e1a5cfeaea02ce57977a, bug report
https://bugzilla.redhat.com/show_bug.cgi?id=1565692
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Jul 2020 03:04:25 +0000 (13:04 +1000)]
evdev: drop the check for tablet vs joystick
libwacom has been unsetting ID_INPUT_JOYSTICK for known tablets since 2015
(libwacom 0.12) so this comment is outdated. And the input-id udev builtin
never labels something as tablet *and* joystick. Which means: systemd sets
either tablet or joystick. For tablets that are known to libwacom the joystick
bit gets corrected and we only see the tablet bits.
Tablets unknown to libwacom remain as joysticks and are ignored but that's the
behavior we had anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Jul 2020 02:22:48 +0000 (12:22 +1000)]
evdev: fix the check for tablet vs joystick
A device may have ID_INPUT_JOYSTICK and ID_INPUT_KEY in which case it would
still get added, despite being a joystick device. Make sure we check only the
tablet and joystick bits - where a device has the joystick bit set but not the
tablet one we ignore it.
Note that this check will get removed in the next commit anyway, it's just
here to make tracking the change easier in the history (and figuring out where
potential regressions come from).
Fixes #415
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Jul 2020 23:09:31 +0000 (09:09 +1000)]
libinput 1.15.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Jul 2020 23:36:30 +0000 (09:36 +1000)]
test: rename the identifier in the 50-litest.conf
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 8 Jul 2020 23:50:49 +0000 (09:50 +1000)]
test: fix the ABS_Y handling for the Protocol A test device
No effect on the test results because we never use ABS_Y anyway for multitouch
devices.
Fixes #505
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 8 Jul 2020 03:25:12 +0000 (13:25 +1000)]
tools: add missing linebreak in error message
Missing from
a0643a9c9879e569c2a47b13f203561de8031cc0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 3 Jul 2020 02:46:38 +0000 (12:46 +1000)]
test: grab the device before any lid or tablet mode switches
Putting an EVIOCGRAB on the device before sending those events means no-one
else sees those events - particularly upower. This means no-one else knows the
lid is on or off and thus we never blank the screen (or suspend/shut down but
those are inhibited anyway).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 3 Jul 2020 02:29:16 +0000 (12:29 +1000)]
test: store the list of open file descriptors in the litest context
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 3 Jul 2020 00:47:13 +0000 (10:47 +1000)]
test: use litest_destroy_context() for test-suite contexts
Symmetrical to litest_create_context(), this allows us to store special data
in that context that we have access to during the tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 3 Jul 2020 00:49:32 +0000 (10:49 +1000)]
test: use context creation helper in the log tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 3 Jul 2020 00:28:53 +0000 (10:28 +1000)]
test: inhibit shutdown and suspend while the tests are running
We test lid switch events which are independently handled by Upower. Let's
make sure nothing else can tell logind to suspend or shut down while we're
running.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 2 Jul 2020 23:55:37 +0000 (09:55 +1000)]
tools: when running the test suite, start the debug-gui minimized
This allows us to run the option parsing test without getting interrupted by a
million debug-gui windows popping up for half a second.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Ryo Munakata [Sun, 28 Jun 2020 20:47:45 +0000 (05:47 +0900)]
Add quirk for Lenovo ThinkPad X1 Tablet (1st Gen)
Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Peter Hutterer [Thu, 2 Jul 2020 02:32:11 +0000 (12:32 +1000)]
gitlab CI: hook up coverity
This requires the COVERITY_SCAN_TOKEN as listed on the project settings page
in coverity itself. The intention here is to run this as a scheduled job, with
the pipeline schedule itself controlling the branch name etc. This way we can
keep the gitlab CI simple enough and just check for COVERITY_SCAN_TOKEN
itself.
This job shouldn't ever fail unless coverity is down (we'll fix that then),
the results of the coverity run are sent to the user that owns the the
scheduled pipeline, i.e. me.
Because coverity does not currently work on F32 (invalid GNU version number:
101), we force this to run on F31.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 2 Jul 2020 22:50:54 +0000 (08:50 +1000)]
gitlab CI: drop custom scheduled handling, set FDO_FORCE_REBUILD instead
This is a leftover from pre-ci-templates days. Now that ci-templates handles
FDO_FORCE_REBUILD remove the custom handling and for the weekly rebuild just
set that variable to 1 in the scheduled pipeline itself.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 1 Jul 2020 00:43:16 +0000 (10:43 +1000)]
tools: change the error message for missing tools
Given that some people appear to not read until the "is not installed" part of
the error message, let's reduce the error message to just that part. This may
be confusing where a user mistypes the actual command but that happens rarely
compared to those that can't run libinput record because it's in a different
package.
Fixes #500
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 1 Jul 2020 00:52:10 +0000 (10:52 +1000)]
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
727dc44b045974699be53d07464867d3183c6eef
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 30 Jun 2020 00:39:58 +0000 (10:39 +1000)]
gitlab CI: move the MR check to the deploy stage
This gives the developer enough time to file an MR after pushing a branch.
Having this run in the first stage means we get false positives because no MR
has been filed yet when the job is run.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 25 Jun 2020 23:27:47 +0000 (09:27 +1000)]
doc: don't ship the .doctree files with the documentation
They're build artifacts and not needed for the actual documentation. Tell
sphinx-build to generate those files in a custom directory that's not part
of the documentation.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
John Rodriguez [Wed, 17 Jun 2020 13:33:08 +0000 (13:33 +0000)]
Add quirks file for Sony Vaio Laptop
The file contains pressure overrides for the VPCEG series.
Signed-off-by: John Rodriguez <johrodri@optonline.net>
Peter Hutterer [Tue, 16 Jun 2020 23:43:54 +0000 (09:43 +1000)]
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>
Peter Hutterer [Tue, 16 Jun 2020 23:37:07 +0000 (09:37 +1000)]
Replace strneq() with strstartswith() for variable prefixes
Leaving in-place all those where we know the length of the prefix, but
replacing all those where we were calling strlen on the prefix.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 16 Jun 2020 22:58:44 +0000 (08:58 +1000)]
utils: add strstartswith() and strendswith() utility functions
Modeled after Python's str.startswith() and str.endswith()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Yariv Barkan [Sat, 13 Jun 2020 14:34:59 +0000 (17:34 +0300)]
quirks: fix Apple external trackpad v2 thresholds
The external Apple "Magic" trackpads, both the first and the second
generations, have pretty good built-in spurious touch filtering. For
these device models libinput's own filtering is not required. Using low
enough values such as 20:10 effectively disables libinput's filtering.
Signed-off-by: Yariv Barkan <oigevald+libinput@gmail.com>
Peter Hutterer [Mon, 15 Jun 2020 10:50:29 +0000 (20:50 +1000)]
gitlab CI: check merge requests for the allow collaboration checkbox
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 15 Jun 2020 10:14:05 +0000 (20:14 +1000)]
gitlab CI: use ci-fairy for commit message checks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 3 Jun 2020 06:21:10 +0000 (16:21 +1000)]
tools: per-slot-delta: if a NONE touch gets data, assume it's starting
If we have a recording that started after the touch down, let's start that
touch on the first x/y position update.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 3 Jun 2020 06:11:47 +0000 (16:11 +1000)]
tools: per-slot-delta: construct the right InputEvent
d107d5 broke this tool because the InputEvent was our local datastructure,
which needed the evbit redirect.
Fixes
d107d58cd25c0e322d3d0a7d68feddcdb9e5e58f
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 28 May 2020 04:13:43 +0000 (14:13 +1000)]
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>
Peter Hutterer [Thu, 28 May 2020 05:25:02 +0000 (15:25 +1000)]
test: fix a bunch of checks for a given switch
The has_switch() function returns -1 if the device doesn't have the switch
capability - which is the same as "true" and how we used this so far. Fix the
checks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 28 May 2020 06:41:09 +0000 (16:41 +1000)]
evdev: a device without any seat caps is an unhandled device
If we don't have any caps, assume the device is unhandled and ignore it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 28 May 2020 04:42:12 +0000 (14:42 +1000)]
fallback: add missing curly braces to match the coding style
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 28 May 2020 00:58:06 +0000 (10:58 +1000)]
touchpad: correct the tap state transitions for a palm on TOUCH_BEGIN
Where a touch is labelled as palm on TOUCH_BEGIN (edge palms) we would still
feed the touch through the tap state machine. This would trigger the PALM
transition for each state, usually reducing the touch count.
When the touches were later released, the touch count was out of sync,
resulting in an error message. In the case of #488, the trigger was
a single evdev frame with three fingers down, the third of which was an edge
palm:
- touch 1 transitions from IDLE to TOUCH
- touch 2 transitions from TOUCH to TOUCH_2
- touch 3 (the palm) transitioned from TOUCH_2 back to TOUCH
That third transition is invalid, the palm hasn't been seen by the tap state
machine so it should just be ignored.
Fix this by moving making the tap state processing conditional on a touch
state other than TOUCH_BEGIN.
Fixes #488
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 28 May 2020 00:57:45 +0000 (10:57 +1000)]
test: move the check for edge palms on devices to litest proper
We'll need this in other files soon
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 28 May 2020 00:33:21 +0000 (10:33 +1000)]
touchpad: add touch state debugging to the palm and tap state debug logs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 3 Jun 2020 11:22:21 +0000 (21:22 +1000)]
gitlab CI: alpine needs pip explicitly installed now
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 2 Jun 2020 00:52:11 +0000 (10:52 +1000)]
Ignore key repeat in all backends
Since we don't really care about keys in any of these backends and buttons
shouldn't autorepeat anyway, this should have no effect on functionality. But
it does guard us against potential kernel bugs like this one:
https://www.spinics.net/lists/linux-input/msg67653.html
See https://gitlab.freedesktop.org/libinput/libinput/-/issues/447#note_468971
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Evan Goode [Fri, 22 May 2020 17:24:34 +0000 (13:24 -0400)]
Allow the flat acceleration profile for touchpads
Signed-off-by: Evan Goode <mail@evangoo.de>
Peter Hutterer [Fri, 22 May 2020 01:39:49 +0000 (11:39 +1000)]
tablet: add support for sendevents on tablets
This is merely the simple support that we use in the fallback backend as
well. It doesn't interact with touch arbitration directly but it'll be
good enough for the default use-case.
Fixes #476
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hans de Goede [Fri, 15 May 2020 19:17:36 +0000 (21:17 +0200)]
quirks: Add HP stream x360 11 ModelTabletModeNoSuspend keyboard quirk
The HP stream x360 11's embedded-controller filters out events form its
builtin keyboard when in tablet-mode itself; and it has a capacitive
home-button (windows logo) underneath its display which also sends
PS/2 key-events.
Suspending the keyboard while in tablet-mode also disable the capacitive
home button, which is undesirable.
Add a ModelTabletModeNoSuspend quirk so that the home button keeps working
when in tablet-mode. This can safely be done since the rest of the
keyboard gets disabled by the embedded-controller for us.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 22 May 2020 03:15:24 +0000 (13:15 +1000)]
tools: replay: allow for missing quirks entry in libinput recordings
Older recordings don't have that field so we should just ignore that
case.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 23 Mar 2020 00:36:00 +0000 (10:36 +1000)]
test: add a test for disabling the forced prox out
This somewhat duplicates the existing test
huion_static_btn_tool_pen_disable_quirk_on_prox_out
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 27 Mar 2020 11:15:50 +0000 (21:15 +1000)]
tablet: handle a valid prox-out sequence after a forced proximity out
With the previous patches a tablet would ignore a valid proximity out sequence
where it happends after a forced prox-out. Fix this by checking the state when
we're in forced proximity out - if we have a zero tool state but a tool
updated then we did get a proximity out.
And fix the existing test to check for that case.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 22 Mar 2020 11:21:52 +0000 (21:21 +1000)]
Revert "tablet: don't disable the proximity quirk on good sequences"
This quirk was introduced for #248 was caused by buggy input-wacom drivers,
not by actual firmware, see
https://gitlab.freedesktop.org/libinput/libinput/issues/381#note_279371
This appears to be the only tablet where this fix was needed, but we've been
playing whack-a-mole ever since to work around the various other tablets that
break with this behavior in place.
So let's revert that fix and hope there aren't any other tablets out there
(and if they are, we can probably quirk those). The revert makes the ISDV4 pen
quirk obsolete (see
9cb089f2b68ba21877ea0973c08837cf073679c8), so this was
folded into this commit.
This reverts commit
4f63345b60762e9a1c1e229a85058232e6f93ae6.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Matt Mayfield [Sat, 4 Apr 2020 17:56:21 +0000 (12:56 -0500)]
touchpad: restore thumb detection while keeping fixes from !292
!292 improved libinput's ability to detect multiple-finger clicks when
the fingers were not aligned close to horizontally. However that caused
thumb detection to fail in several use cases.
This patch restores thumb detection for
- 2+ finger physical clickpad presses
- resting thumb while two-finger scrolling
- touches in the thumb exclusion area during multi-finger taps
and improves pinch detection when thumb is centered below fingers.
It also further enhances the flexibility of finger position for 2-, 3-,
or 4-finger taps: if all tapping fingers land on the touchpad within a
short time (currently 100ms), they will all count regardless of
position (unless below the lower_thumb_line).
Signed-off-by: Matt Mayfield <mdmayfield@yahoo.com>
Peter Hutterer [Mon, 18 May 2020 01:47:29 +0000 (11:47 +1000)]
Deprecate wheel tilt as separate axis source
This has never been supported through the stack. No device ever had the
required MOUSE_WHEEL_TILT_VERTICAL/HORIZONTAL udev property set, so
libinput never set the right axis source. Neither weston nor mutter
added the code for it. Even if we added wheel tilt for devices now, it
would break those devices. And the benefit we get from having those
separate is miniscule at best.
So let's do the long-term thing and just deprecate this axis source.
The wheel tilt mouse test device remains in the test suite, with the
udev properties set just to verify that we do indeed ignore those now.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 21 May 2020 03:32:13 +0000 (13:32 +1000)]
quirks: mark the 0x233 razer keyboard as internal
Razer Blade 2018 has a different model ID than the one we already have.
Fixes #489
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 13 Apr 2020 05:12:43 +0000 (15:12 +1000)]
evdev: warn if our event processing lags by 10ms or more
Take a snapshot of the time every 10 libinput_dispatch() calls. During event
processing, check if the event timestamp is more than 10ms in the past and
warn if it is. This should provide a warning to users when the compositor is
too slow to processes events but events aren't coming in fast enough to
trigger SYN_DROPPED.
Because we check the device event time against the dispatch time we may get
warnings for multiple devices on delayed processing. This is intended, it's
good to know which devices were affected.
In the test suite we need to ignore the warning though, since we compose the
events in very specific ways it's common to exceed that threshold
(particularly when calling litest_touch_move_to).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 16 Apr 2020 00:58:00 +0000 (10:58 +1000)]
test: fix the lookup for the timer offset warnings
This was changed in
5e25bdfb0374bf7f9a6b5fc887e81d6a0b492f70 but the litest
message lookup wasn't changed. Let's do that now and change to a generic
wording we can re-use for other messages.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 12 May 2020 03:46:04 +0000 (13:46 +1000)]
touchpad: correct a comment regarding the touchpad integration
The previous text wasn't accurate enough, USB used to be considered
external but we've since started deferring to the hwdb for those (except
Apple).
Fixes #483
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Troels Blicher Petersen [Sat, 18 Apr 2020 22:25:12 +0000 (00:25 +0200)]
Lenovo X201 Tablet: Added bezel buttons support in tablet mode
This patch allows the bezel buttons,
to work when entering SW_TABLET_MODE
similar to how other x2xx tablets are
working.
Signed-off-by: Troels Blicher Petersen <troels@newtec.dk>
Peter Hutterer [Sun, 19 Apr 2020 05:53:11 +0000 (15:53 +1000)]
tools: measure-fuzz: sleep for 2 seconds to give the hwdb time
one second isn't always enough here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 19 Apr 2020 05:46:12 +0000 (15:46 +1000)]
tools: measure-fuzz: fix the tool to work again
Where libinput is installed, checking whether the fuzz is applied to the
device will always fail with an error - the udev rules will remove the
fuzz and copy its value to the LIBINPUT_FUZZ properties instead.
So let's fix this: where the fuzz shows up on the device print a warning
because libinput's udev rule isn't working. And where it's missing check
the udev properties and compare those to the settings instead.
Fixes #472
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 19 Apr 2020 05:22:34 +0000 (15:22 +1000)]
tools: measure-fuzz: run systemd-hwdb update, not udevadm hwdb
For backwards compatibility reasons, the hwdb.bin created udevadm hwdb
does not actually apply matches in the way you'd expect. systemd-hwdb
creates the newer format and is preferred.
Related: #472
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 19 Apr 2020 05:18:42 +0000 (15:18 +1000)]
tools: measure-fuzz: handle a None return correctly
Fixes #472
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sat, 18 Apr 2020 05:07:10 +0000 (15:07 +1000)]
gitlab CI: Ubuntu 19.04 is EOL, drop it
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>