José Expósito [Sun, 12 Sep 2021 15:09:20 +0000 (17:09 +0200)]
util: add a function to parse bool properties
Move the logic used to parse boolean quirks and udev flags to a common
function in utils.
Refactor, no functional changes.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
weizhixiang [Mon, 30 Aug 2021 09:39:56 +0000 (18:39 +0900)]
use ARRAY_FOR_EACH when traverse array
Signed-off-by: weizhixiang <weizhixiang@uniontech.com>
José Expósito [Mon, 6 Sep 2021 16:51:01 +0000 (18:51 +0200)]
quirks: Microsoft Surface Pro 3 Cover
Mark the Microsoft Surface Pro 3 Cover keyboard as internal.
Fix https://gitlab.freedesktop.org/libinput/libinput/-/issues/655
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Mon, 6 Sep 2021 06:42:28 +0000 (08:42 +0200)]
doc: add missing literal blocks in contributing
Add missing literal blocks in the section "Failed pipeline errors"
introduced in
140b4b78530b62f8dc70645153b75b4adae23ed9.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Clayton Craft [Sun, 5 Sep 2021 20:53:44 +0000 (13:53 -0700)]
quirks: Pine64 PineBook Pro keyboard
The keyboard is 'internal' (built-in), and attached over usb.
Signed-off-by: Clayton Craft <clayton@craftyguy.net>
Peter Hutterer [Wed, 1 Sep 2021 04:09:26 +0000 (14:09 +1000)]
libinput 1.18.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 22 Nov 2018 00:24:54 +0000 (10:24 +1000)]
High-resolution scroll wheel support
Starting with kernel v5.0 two new axes are available for high-resolution wheel
scrolling: REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES. Both axes send data in
fractions of 120 where each multiple of 120 amounts to one logical scroll
event. Fractions of 120 indicate a wheel movement less than one detent.
This commit adds a new API for scroll events. Three new event types that encode
the axis source in the event type name and a new API to get a normalized-to-120
value that also used by Windows and the kernel (each multiple of 120 represents
a logical scroll click).
This addresses a main shortcoming with the existing API - it was unreliable to
calculate the click angle based on the axis value+discrete events and thus any
caller using the axis value alone would be left with some ambiguity. With the
v120 API it's now possible to (usually) calculate the click angle, but more
importantly it provides the simplest hw-independent way of scrolling by a
click or a fraction of a click.
A new event type is required, the only way to integrate the v120 value
otherwise was to start sending events with a discrete value of 0. This
would break existing xf86-input-libinput (divide by zero, fixed in 0.28.2) and
weston (general confusion). mutter, kwin are unaffected.
With the new API, the old POINTER_AXIS event are deprecated - callers should use
the new API where available and discard any POINTER_AXIS events.
Notable: REL_WHEEL/REL_HWHEEL are emulated by the kernel but there's no
guarantee that they'll come every accumulated 120 values, e.g. Logitech mice
often send events that don't add up to 120 per detent.
We use the kernel's wheel click emulation instead of doing our own.
libinput guarantees high-resolution events even on pre-5.0 kernels.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Sat, 24 Jul 2021 11:54:24 +0000 (13:54 +0200)]
test: refactor litest_assert_event_type logic
Extract the logic in litest_assert_event_type to a generic function,
litest_assert_event_type_is_one_of, that takes a variable number of
expected event types.
Refactor, no functional changes.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Dmitry Maluka [Thu, 26 Aug 2021 21:06:30 +0000 (23:06 +0200)]
quirks: Thinkpad T470 trackpoint multiplier
Set multiplier for T470 to 0.4, same as for T480.
Trackpoint behavior on T470 was good before 1.9.0 (more precisely,
before the commit 87b568) when a new trackpoint acceleration algorithm
was introduced instead of the traditional linear filter. Since then
it is too sensitive and seems impossible to fine-tune using hw settings
or libinput accel speed setting.
With multiplier set to 0.4 it is as good (or better) as in 1.8.4.
Sensitivity feels the same as in 1.8.4 with the same hw settings for
speed and sensitivity.
Signed-off-by: Dmitry Maluka <dmitrymaluka@gmail.com>
José Expósito [Tue, 24 Aug 2021 16:01:59 +0000 (18:01 +0200)]
quirks: Lenovo Trackpoint Keyboard II
The device sends its own scroll events when its trackpoint is moved
while the middle button is pressed.
Because scroll events are inhibited while the middle button is pressed
a quirk is necessary for this device to not inhibit scroll events.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Peter Hutterer [Tue, 3 Aug 2021 22:53:47 +0000 (08:53 +1000)]
test: create devices for our udev seat checks
This way we can ensure that at least one device is available, and that
it is the device we want.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
José Expósito [Tue, 3 Aug 2021 17:55:39 +0000 (19:55 +0200)]
editorconfig: add settings for meson files
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Peter Hutterer [Tue, 3 Aug 2021 02:03:23 +0000 (12:03 +1000)]
test: use MESON_TESTTHREADS to determine the number of jobs
meson uses MESON_TESTTHREADS to determine the number of parallel test
jobs. Since our main test suite cannot be run in parallel anyway, use
that same variable in litest to determine how many jobs we should fork
off.
In the CI pipeline, we can use FDO_CI_CONCURRENT to pass that down so we
don't end up running a billion jobs on a test runner.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
José Expósito [Tue, 3 Aug 2021 17:53:36 +0000 (19:53 +0200)]
meson.build: use the / operator instead of join_paths
Starting with meson v0.49.0, the "/" operator can be used instead of
join_paths.
Update meson to v0.49.0 and remove all calls to join_paths.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Wed, 16 Jun 2021 21:45:58 +0000 (23:45 +0200)]
ci: update to GTK 4 when available
Update GTK to version 4 on Fedora, Arch and Alpine Linux.
Not updating Debian and FreeBSD because the package is not available yet
and Ubuntu because it is not available on 20.10.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 29 Jul 2021 17:01:44 +0000 (19:01 +0200)]
debug-gui: pointer locking on X11
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Wed, 16 Jun 2021 20:53:45 +0000 (22:53 +0200)]
debug-gui: pointer locking on Wayland
Use the pointer constraints protocol to lock the pointer on Wayland.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 29 Jul 2021 16:07:32 +0000 (18:07 +0200)]
debug-gui: migrate to GTK4
Global:
- Stop passing commandline arguments to gtk_init:
https://docs.gtk.org/gtk4/migrating-3to4.html#stop-passing-commandline-arguments-to-gtk_init
window_init function:
- gtk_window_new doesn't require a type anymore
- gtk_window_iconify has been renamed to gtk_window_minimize
- gtk_container_add has been removed in favor of container specific
APIs. Use gtk_window_set_child in this case.
- gtk_widget_show_all has been removed, widgets are now visible by
default:
https://docs.gtk.org/gtk4/migrating-3to4.html#widgets-are-now-visible-by-default
- gtk_widget_set_events to NULL is no longer required, widgets must set
their event handlers explicitly now:
https://blog.gtk.org/2020/04/29/custom-widgets-in-gtk-4-input/
window_delete_event_cb function:
- Use the new close-request event:
https://docs.gtk.org/gtk4/migrating-3to4.html#stop-using-gtkwidget-event-signals
map_event_cb function:
- gtk_widget_set_cursor_from_name instead of gdk_window_set_cursor
- Wait until the draw area is resized to use the whole window to start
calculating sizes
window_place_ui_elements function:
- Use gtk_widget_get_width and gtk_widget_get_height instead of
gtk_window_get_size
Drawing:
- Use gtk_drawing_area_set_draw_func instead of the GtkWidget::draw
signal:
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-drawing-model-changes
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 29 Jul 2021 17:33:42 +0000 (19:33 +0200)]
tools/debug-gui: refactor UI element placement
Move the code used to pace the different UI elements to its own
function.
Refactor, no functional changes.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 10 Jun 2021 18:07:00 +0000 (20:07 +0200)]
tools/debug-gui: use GMainLoop instead of gtk_main
Migrate to GMainLoop because gtk_main is deprecated in GTK 4.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 10 Jun 2021 18:06:23 +0000 (20:06 +0200)]
tools/debug-gui: move gtk_main_quit to a function
Wrap the calls to gtk_main_quit in its own function.
Refactor, no functional changes.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Peter Hutterer [Tue, 3 Aug 2021 02:10:18 +0000 (12:10 +1000)]
meson.build: disable documentation by default
This does little other than drag in a whole bunch of dependencies. The
libinput documentation is designed to be consumed online, so there's no
need building it on every machine.
We leave the dependencies installed in the images because it's a lot
easier to remove them and test if the build still works than adding them
and dragging in every updated package since we built the image.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
satrmb [Fri, 30 Jul 2021 20:59:22 +0000 (22:59 +0200)]
quirks: Chuwi AeroBook Plus has a clickpad falsely claiming to have BTN_RIGHT
Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
Quytelda Kahja [Fri, 30 Jul 2021 12:53:18 +0000 (05:53 -0700)]
test: Add test for parsing of boolean quirk attributes.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
José Expósito [Thu, 29 Jul 2021 09:35:02 +0000 (11:35 +0200)]
doc: add common failed pipeline errors
Add a section in the contributing documentation with common pipeline
errors and how to fix them and point to this page when the CI fails.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Peter Hutterer [Wed, 28 Jul 2021 23:22:48 +0000 (09:22 +1000)]
gitlab CI: drop dependencies between jobs
None of our jobs rely on the artifacts of a previous job, so let's not
pass those around. Make this part of the default policy and include it
from every job.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Quytelda Kahja [Mon, 26 Jul 2021 03:20:17 +0000 (20:20 -0700)]
Add section for Lenovo Yoga C930 tablet in 50-system-lenovo.quirks.
Fixes #632.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Quytelda Kahja [Mon, 26 Jul 2021 02:23:06 +0000 (19:23 -0700)]
quirks: Add tablet smoothing attribute.
https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/512 disables
input smoothing for AES devices. However, some AES devices produce
segmented/wobbly curves without smoothing. This change introduces an
`AttrTabletSmoothing` boolean property, which overrides the default smoothing
behavior.
See #632
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Sanjiv [Wed, 28 Jul 2021 04:27:56 +0000 (04:27 +0000)]
Update quirks/50-system-chuwi.quirks
Author: Sanjiv <sanjerat@gmail.com>
Date: Wed Jul 28 04:27:56 2021 +0000
Signed-off-by: Sanjiv Erat <sanjerat@gmail.com>
Kevin Anderson [Wed, 28 Jul 2021 20:44:19 +0000 (16:44 -0400)]
quirks: add Framework Touchpad Quirk
Handle a bug that the touchpad announces BTN_RIGHT
Signed-off-by: Kevin Anderson <andersonkw2@gmail.com>
Peter Hutterer [Wed, 28 Jul 2021 02:39:57 +0000 (12:39 +1000)]
gitlab CI: debug the meson_build script
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 28 Jul 2021 01:21:17 +0000 (11:21 +1000)]
Define the versionsort overrides as inlines
Squashes compiler warnings about unused functions given this header is
included in multiple files.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 26 Jul 2021 01:13:17 +0000 (11:13 +1000)]
gitlab CI: use the ci-templates FreeBSD templates
Replace our cross-compilation for FreeBSD with a proper template.
FreeBSD doesn't do normal containers so we need a bunch of if/else to
skip the container builds.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 28 Jul 2021 02:43:34 +0000 (12:43 +1000)]
gitlab CI: move the SUITES handling to the template where it matters
Should have been part of
9133693b15eb8211c7b08eb2f486a88d915715f6.
This fixes an issue with calls to meson_build.sh with an otherwise empty
MESON_TEST_ARGS - thanks to the space before $SUITES it would no longer
the zero-string condition in meson_build.sh.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 27 Jul 2021 23:00:00 +0000 (09:00 +1000)]
gitlab CI: update to latest ci-templates
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 26 Jul 2021 01:03:03 +0000 (11:03 +1000)]
gitlab CI: split the qemu meson build parts out as separate template
This was part of the test-suite-vm template but to make it easily
re-usable split out the parts that are just about building in a qemu
image from the parts that are specific to running the test suites.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 26 Jul 2021 00:47:18 +0000 (10:47 +1000)]
gitlab CI: name the qemu tags per distribution
Having only one qemu tag worked only because we only had one
distribution using qemu. If we have multiple of those we just
duplicate/overwrite the variable so let's not do that.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 27 Jul 2021 04:29:16 +0000 (14:29 +1000)]
doc/user: move the hold gesture section up to the others
Better structuring this way: pinch, swipe, hold, then other comments
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 27 Jul 2021 04:26:14 +0000 (14:26 +1000)]
doc/user: fix the line alignments for the hold gesture tables
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Andrea Ippolito [Thu, 22 Jul 2021 07:45:45 +0000 (07:45 +0000)]
doc/user: make "verifying install" command portable
According to the linker man page libraries are searched in the following paths:
LD_LIBRARY_PATH environment variable
Paths in the cache file /etc/ld.so.cache
/lib, /usr/lib, /lib64 and /usr/lib64
As we are not using LD_LIBRARY_PATH, we can rely on ldconfig as a fairly portable solution because it "creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib)".
Tested on fedora 34, manjaro 2021.07, kubuntu 21.04
Signed-off-by: Andrea Ippolito <andrea.ippo@gmail.com>
Peter Hutterer [Thu, 22 Jul 2021 05:27:45 +0000 (15:27 +1000)]
touchpad: remove two unused functions
These functions have been unused since
1668cd5e8158a4d98516bfc7432af78be934253f
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 22 Jul 2021 05:25:03 +0000 (15:25 +1000)]
Mark some functions as printf-like to silence some compiler warnings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 22 Jul 2021 05:16:56 +0000 (15:16 +1000)]
Disable -Wmissing-field-initializers
We really don't care about that one.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 22 Jul 2021 05:11:32 +0000 (15:11 +1000)]
Silence compiler warnings for -Wformat-nonliteral
In the various logging functions where we need to modify the format
argument, disable the compiler warnings. Interestingly, GCC doesn't seem
to mind those but building with clang unleashes pages of warnings.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 22 Jul 2021 05:00:32 +0000 (15:00 +1000)]
Replace fallthrough comments with __attribute__((fallthrough))
This has recently been endorsed by the linux kernel, it should be good
enough for us.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 22 Jul 2021 01:37:27 +0000 (11:37 +1000)]
util-list: restore list_for_each_safe() to be a single statement
3d3d9b7f69b1119523becab3160378066db2e1c0 got rid of the need for a tmp
argument for list_for_each_safe() but switched the loop to be a
multiline statement. This could potentially cause bugs where the loop is
used inside a block without curly braces, e.g.
if (condition)
list_for_each_safe()
func()
The assignment preceding the actual loop would result in the code
reading as:
if (condition)
pos = ....
list_for_each_safe()
The actual list loop would be unconditional.
Fix this by moving the initial assignment into an expression statement.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 9 Jul 2021 01:33:12 +0000 (11:33 +1000)]
quirks: add a quirk for the X61 bezel buttons
Fixes #628
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The_Observer [Fri, 9 Jul 2021 16:54:58 +0000 (18:54 +0200)]
quirks: add a quirk for the Purism Librem 14v1
Clickpad that announces BTN_RIGHT
Fixes #629
Signed-off-by: The_Observer <The_Observer@lindemann.space>
Mohamed Elsharnouby [Sun, 11 Jul 2021 22:41:07 +0000 (22:41 +0000)]
quirks: add pressure range for Dell Latitude 7480
Pressing Ctrl/Shift on this model triggers light touches that causes random clicks.
This doesn't occur on Windows 10 so adding this quirk to fix it
Signed-off-by: sharno <sharnoby3@gmail.com>
Thomas Stenhouse-Pyne [Sat, 26 Jun 2021 11:01:36 +0000 (12:01 +0100)]
quirks: add volume rocker quirk for Lenovo Duet 7i
Signed-off-by: Thomas Stenhouse-Pyne <tommpyne@gmail.com>
Thomas Weißschuh [Sun, 20 Jun 2021 22:34:37 +0000 (00:34 +0200)]
evdev: remove device when it is gone
This was observed when running in device mode with:
`libinput debug-events $EVENT_NODE`
When removing the monitored device, the no "device removed" message was
not shown.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Peter Hutterer [Sun, 20 Jun 2021 22:51:04 +0000 (08:51 +1000)]
quirks: add a quirk for the Huawei Matebook 2020 touchpad
Clickpad that announces BTN_RIGHT
https://bugzilla.redhat.com/show_bug.cgi?id=1972370
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 17 Jun 2021 06:10:53 +0000 (16:10 +1000)]
gitlab CI: add a comment to explain how to actually edit the CI
We tell users not to edit it, but don't tell them how to change it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
luokai [Tue, 15 Jun 2021 03:27:29 +0000 (11:27 +0800)]
using secure functions safe_strdup
Signed-off-by: luokai <l18674732394.com>
Peter Hutterer [Wed, 9 Jun 2021 23:46:17 +0000 (09:46 +1000)]
meson.build: bump to 1.18.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
José Expósito [Mon, 31 May 2021 15:58:39 +0000 (17:58 +0200)]
gestures: improve one finger hold detection
When one finger is used to hold, tiny pointer movement deltas can easily
end the gesture.
Add a movement threshold to avoid small movement, before or after the hold
timeout, ending the gesture and make the hold-to-interact user
interaction more reliable.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Mon, 31 May 2021 15:58:11 +0000 (17:58 +0200)]
gestures: move first_moved and first_mm up
Move the calculation of first_moved and first_mm up inside
tp_gesture_detect_motion_gestures in order to be able to use their
values in the one finger code path.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Mon, 31 May 2021 15:57:44 +0000 (17:57 +0200)]
gestures: always save touch information
When a single touch is used to hold or to move the pointer, save
information about the touch.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Wed, 9 Jun 2021 07:03:15 +0000 (09:03 +0200)]
doc: update draw.io URL
The tool used to generate diagrams (draw.io) is now diagrams.net.
Update the URL in the comments.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Wed, 9 Jun 2021 06:57:55 +0000 (08:57 +0200)]
doc: add touchpad gestures state machine diagram
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Peter Hutterer [Fri, 20 Sep 2019 03:49:34 +0000 (13:49 +1000)]
doc: add docs for hold gestures
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 23 Sep 2019 04:15:43 +0000 (14:15 +1000)]
doc: note that gestures may be cancelled
This has been in place forever, so let's note it in the docs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
José Expósito [Thu, 27 May 2021 17:20:37 +0000 (19:20 +0200)]
gestures: add quick hold implementation
When 1 or 2 fingers are used to hold, use a faster timer to make the
"hold to stop kinetic scrolling" user interaction feel more immediate.
Also handle double tap and tap and drag interations to send only one
hold gesture instead of two.
Holding with 3 or 4 fingers remains the same to try to avoid callers
missusing hold gestures to build their own tap implementation.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:20:31 +0000 (19:20 +0200)]
tests: add hold gesture tests
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:20:23 +0000 (19:20 +0200)]
tests: optionally hold in gesture test functions
Add an extra parameter to the common gesture test functions to allow to hold
before performing the gesture.
This parameter will be used by the hold tests allowing to share the code.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:20:11 +0000 (19:20 +0200)]
tests: move existing gesture tests to functions to be able to reuse them
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:20:03 +0000 (19:20 +0200)]
gestures: add hold gesture implementation
Hold gestures are notifications about fingers on the touchpad.
There is no coordinate attached to a hold gesture, merely the number of fingers.
A hold gesture starts when the user places a finger on the touchpad and
ends when all fingers are lifted. It is cancelled when the finger(s) move
past applicable thresholds and trigger some other interaction like pointer
movement or scrolling.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:19:49 +0000 (19:19 +0200)]
gesutures: allow to configure hold gestures
Valgrind can be too slow to run some time based tests. In those cases, we
need to disable hold gestures.
Add the required functions to configure hold gestures: enable, disable,
get default state and get current state.
Keep them private as they are intended to be used only from the tests.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:19:38 +0000 (19:19 +0200)]
libinput: add hold gesture public API and tool support
Add hold gestures to the public API and the private functions to notify them.
Also add hold gestures to debug-events and debug-gui.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:19:21 +0000 (19:19 +0200)]
gestures: filter motion inside the gesture state machine
At the moment, every gesture is triggered by motion. In order to implement
gestures not based on motion, like hold, it is required to filter the unwanted
motion inside the gesture state machine so it transits to the correct states.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:19:12 +0000 (19:19 +0200)]
gestures: use events to change between states
Refactor the gesture state machine to emit events to change between states.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:18:54 +0000 (19:18 +0200)]
gestures: handle pointer motion as an extra state
Refactor the gesture state machine to integrate pointer motion as an extra state
of the state machine.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Tue, 1 Jun 2021 17:11:19 +0000 (19:11 +0200)]
gestures: refactor gesture enabled
Move the condition to check if gestures are enabled to its own function.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
José Expósito [Thu, 27 May 2021 17:18:16 +0000 (19:18 +0200)]
gestures: add a function to know if there is pending pointer motion
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Peter Hutterer [Wed, 2 Jun 2021 03:06:37 +0000 (13:06 +1000)]
libinput 1.18.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Neev Parikh [Mon, 31 May 2021 16:24:43 +0000 (16:24 +0000)]
Update 50-system-asus.quirks to include Asus G15 Zephyrus quirk.
Signed-off-by: Neev Parikh <neev.v.parikh@gmail.com>
Peter Hutterer [Wed, 26 May 2021 03:17:59 +0000 (13:17 +1000)]
libinput 1.17.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 18 May 2021 23:49:39 +0000 (09:49 +1000)]
gitlab CI: use FDO_CI_CONCURRENT in our meson build script
Always prefix the ninja args with the FDO_CI_CONCURRENT values (i.e. how many
jobs the runner tells us).
Note that this variable is currently not passed through to the qemu jobs, so
inside the VM we'll still use the ninja default values.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 25 May 2021 01:03:44 +0000 (11:03 +1000)]
doc/user: #wayland is now on oftc
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
José Expósito [Sun, 23 May 2021 17:32:33 +0000 (19:32 +0200)]
test: cleanup: remove fallthrough followed by break
Remove fallthrough comments followed by a break statement.
No functional changes.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
weizhixiang [Wed, 19 May 2021 12:48:34 +0000 (21:48 +0900)]
use more safety list_for_each_safe when remove element in traversing list
Signed-off-by: weizhixiang <weizhixiang@uniontech.com>
weizhixiang [Wed, 19 May 2021 12:09:30 +0000 (21:09 +0900)]
use ARRAY_FOR_EACH when traverse array
Signed-off-by: weizhixiang <weizhixiang@uniontech.com>
satrmb [Wed, 19 May 2021 08:13:06 +0000 (10:13 +0200)]
evdev: restart debouncing timers after every event
Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
novenary [Sun, 4 Apr 2021 15:44:36 +0000 (18:44 +0300)]
Increase pinch grace period to 300ms
Windows allows "about a third of a second" to trigger a two-finger
pinch.
https://gitlab.freedesktop.org/libinput/libinput/-/issues/550#implementation-in-other-systems
Signed-off-by: novenary <streetwalkermc@gmail.com>
novenary [Sun, 4 Apr 2021 15:40:09 +0000 (18:40 +0300)]
Allow reviving a thumb that moves sufficiently
When pinching, the thumb tends to move slower than the finger, so we may
suppress it too early.
Add a grace period during which it may be revived.
Signed-off-by: novenary <streetwalkermc@gmail.com>
novenary [Sun, 4 Apr 2021 15:30:41 +0000 (18:30 +0300)]
Improve disambiguation between two-finger pinch and scroll
A pinch is defined as two fingers moving in different directions, and a
scroll as two fingers moving in the same direction.
Often enough when the user is trying to pinch, we may initially see both
fingers moving in the same direction and decide that they want to
scroll.
Add a grace period during which we may transition to a pinch in those
situations.
Test fix: touchpad_trackpoint_buttons_2fg_scroll emits movements that
change the distance between fingers, which triggers this new transition
and makes the test fail; correct this.
Signed-off-by: novenary <streetwalkermc@gmail.com>
dan g [Sat, 10 Apr 2021 15:45:01 +0000 (17:45 +0200)]
quirks: add palm rejection support for all Razer Blade models
Generated with a script to scrape the openrazer project for Razer Blade
internal keyboard VIDs, see `razer_quirk_util.py` [1]
This allows us to potentially bulk-add all Razer Blade models to benefit from
palm rejection, rather than processing individual requests and merges.
[1] https://gist.github.com/danryu/
ee0c24ac50af40321550462bbf9ab594
Signed-off-by: dan g <dan.garton@gmail.com>
Peter Hutterer [Mon, 17 May 2021 07:56:14 +0000 (17:56 +1000)]
tools/record: narrow down the obfuscation range
Let a few obvious modifiers through, including the F-key range. Especially
left control is useful to know if it's down.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 17 May 2021 06:09:35 +0000 (16:09 +1000)]
tools/replay: do not replay key repeat events
The kernel emulates key events on its own anyway, replaying key events with
libinput replay as well just duplicates the events. Turning kernel
repeat off is not an option, it makes the device look different (EV_REP
changes). So let's just not replay those events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 May 2021 04:26:27 +0000 (14:26 +1000)]
gitlab CI: add a JUnit XML report for scan-build
Use a scan-build wrapper to generate plist files, then parse those into a
JUnit xml format. This makes the errors appear on the main MR page as opposed
to being hidden in the artifacts somewhere.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 May 2021 01:41:05 +0000 (11:41 +1000)]
editorconfig: add settings for python files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 May 2021 21:39:05 +0000 (07:39 +1000)]
gitlab CI: bump from Fedora 32 to 34
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 18 Feb 2021 04:20:22 +0000 (14:20 +1000)]
tools/record: add support for hidraw recording
New commandline switch --with-hidraw. This will open all hidraw devices
associated with this device and add any reports to the output in the
form:
events:
- hid:
time: [0, 0]
hidraw1: [0x01, 0x02, 0x03, 0x05, 0x06]
hidraw2: [0x07, 0x08, 0x09, 0x0a, 0x0b]
- evdev:
...
i.e. there's a nesting of `hid` with a list of reports, each with the hidraw
node as dictionary entry.
Because hidraw events do not have timestamps and always occur before the evdev
events, they are in a separate frame (as shown above). We could try to figure
out how to match them with the upcoming evdev frame but it's not worth it for
now.
The timestamp itself is a special key in the hidraw with the timestamp from
clock_gettime.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 5 May 2021 02:46:33 +0000 (12:46 +1000)]
meson.build: bump to 1.17.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Nicolas Fella [Tue, 4 May 2021 18:58:14 +0000 (20:58 +0200)]
doc/user: Add instructions for using with CMake
CMake provides a nice way to use libinput, let the world now.
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
Hans Gaiser [Thu, 29 Apr 2021 19:30:09 +0000 (21:30 +0200)]
Add quirk for Lenovo Legion 5 Pro.
Signed-off-by: Hans Gaiser <hansg91@gmail.com>
Peter Hutterer [Thu, 29 Apr 2021 00:12:46 +0000 (10:12 +1000)]
tools/record: linebreak the hid report descriptor every 16 bytes
New output:
hid: [
0x05, 0x0d, 0x09, 0x04, 0xa1, 0x01, 0x85, 0x01, 0x09, 0x22, 0xa1, 0x02, 0x09, 0x42, 0x15, 0x00,
0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 0x81, 0x02, 0x75, 0x01, 0x81, 0x03, 0x75, 0x06, 0x09, 0x51,
0x25, 0x3f, 0x81, 0x02, 0x26, 0xff, 0x00, 0x75, 0x08, 0x09, 0x48, 0x81, 0x02, 0x09, 0x49, 0x81,
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 29 Apr 2021 00:04:46 +0000 (10:04 +1000)]
tools/record: print the HID report descriptor as hex
YAML does support hex as long as it's 0x-prefixed. The comment here (probably)
dates from an in-development version of libinput-record that used JSON.
Anyway, let's print the HID report descriptor as hex because that's the common
format for it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 7 Apr 2021 05:26:16 +0000 (15:26 +1000)]
tools/record: fix a strlen assumption
We want to be able to print single-character strings.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 29 Apr 2021 00:36:18 +0000 (10:36 +1000)]
Change various references to the master branch to main
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>