platform/upstream/libinput.git
21 months agolibinput 1.24.0 upstream_bkup_20250204 upstream_work_20240104 1.24.0
Peter Hutterer [Fri, 25 Aug 2023 03:02:58 +0000 (13:02 +1000)]
libinput 1.24.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
21 months agoquirks: Add Wacom Bamboo Fun Pen
Bjørn Forsman [Thu, 24 Aug 2023 17:20:47 +0000 (19:20 +0200)]
quirks: Add Wacom Bamboo Fun Pen

We must disable ABS_DISTANCE or else the automatic pressure offset
calculation doesn't work for this device.

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
21 months agotablet: increase pressure offset limit from 20% to 50%
Bjørn Forsman [Sat, 17 Dec 2022 16:52:39 +0000 (17:52 +0100)]
tablet: increase pressure offset limit from 20% to 50%

detect_pressure_offset() currently rejects offsets that are greater than
20%. My graphics tablet (Wacom Bamboo Fun) is about 30%. The pen tip is
2 mm. Wacom recommends replacing at 1 mm, which means this isn't worn
out yet and we should instead increase the limit to make these devices
usable.

Without this change a "pen down" event happens simultaneously with the
pen being detected -- about 1 cm above the surface -- and producing
libinput pressure of about 0.30. This means you start drawing "in the
air", without knowing up front where the cursor is going to be.

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
21 months agodocs: improve custom pointer acceleration documentation.
Yinon Burgansky [Wed, 16 Aug 2023 17:13:39 +0000 (20:13 +0300)]
docs: improve custom pointer acceleration documentation.

- Explain calculation made by the driver.
- Provide detailed example with a plot for a custom function.
- Fix inaccurate explanation of unit values.

Signed-off-by: Yinon Burgansky <yinonburgansky@gmail.com>
22 months agoquirks: add quirk for the RazerBlade152023 keyboard
Peter Hutterer [Tue, 8 Aug 2023 17:25:48 +0000 (20:25 +0300)]
quirks: add quirk for the RazerBlade152023 keyboard

Autogenerated from our razer-quirks-lister.py tool

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
22 months agoquirks: Add Lenovo Legion 7i 4090 keyboard quirks
José Expósito [Mon, 31 Jul 2023 15:16:42 +0000 (17:16 +0200)]
quirks: Add Lenovo Legion 7i 4090 keyboard quirks

Disable while typing is not working because the keyboard uses the USB
bus.

Add the `AttrKeyboardIntegration=internal` quirk to fix it.

Fixes https://gitlab.freedesktop.org/libinput/libinput/-/issues/911
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
22 months agoquirks: AddHP Spectre x360 15 ModelTabletModeNoSuspend keyboard quirk
José Expósito [Mon, 31 Jul 2023 11:24:57 +0000 (13:24 +0200)]
quirks: AddHP Spectre x360 15 ModelTabletModeNoSuspend keyboard quirk

The HP stream x360's embedded-controller filters out events form its
builtin keyboard when in tablet-mode itself; and it has a volume up/down
on the side.

Do not suspend the keyboard when in tablet-mode so that the volume
up/down button keeps working when in tablet-mode.

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.

Fixes https://gitlab.freedesktop.org/libinput/libinput/-/issues/920
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
22 months agodocs: fix "See also" link in libinput_config_accel_profile
Llerraf Gnem [Wed, 26 Jul 2023 16:41:34 +0000 (11:41 -0500)]
docs: fix "See also" link in libinput_config_accel_profile

Used to be to libinput_device_config_accel_set_points, corrected to
libinput_config_accel_set_points

22 months agoDrop the Signed-off-by requirement
Peter Hutterer [Thu, 20 Jul 2023 04:01:25 +0000 (14:01 +1000)]
Drop the Signed-off-by requirement

We've had this for roughly 10y now and it's value is dubious. Most of
xorg no longer requires, mesa accepts but doesn't require it, most of GNOME
doesn't accept it and neither does systemd.

Let's drop the requirement.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
22 months agoFix a few gcc analyzer complaints in util-strings.*
Peter Hutterer [Wed, 19 Jul 2023 04:16:45 +0000 (14:16 +1000)]
Fix a few gcc analyzer complaints in util-strings.*

Sprinkle a few asserts into the various string helpers for where our
arguments must not be NULL.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
22 months agoFix a gcc analyzer complaint
Peter Hutterer [Tue, 18 Jul 2023 06:04:51 +0000 (16:04 +1000)]
Fix a gcc analyzer complaint

Doesn't trigger here since we never call it with NULL but let's make
sure anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
22 months agotest: expand the tablet mode switch test to check for fake key releases
Peter Hutterer [Fri, 14 Jul 2023 02:57:58 +0000 (12:57 +1000)]
test: expand the tablet mode switch test to check for fake key releases

If a key is still down when the tablet mode switch goes on, make sure we
release the key before the switch goes in effect.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
23 months agoAdd a triage policy for kernel bugs
Peter Hutterer [Tue, 4 Jul 2023 03:52:44 +0000 (13:52 +1000)]
Add a triage policy for kernel bugs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
23 months agoAdd triage policies for merge requests
Peter Hutterer [Tue, 4 Jul 2023 02:14:04 +0000 (12:14 +1000)]
Add triage policies for merge requests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
23 months agodoc/user: quirks are available, not supported
Peter Hutterer [Fri, 23 Jun 2023 04:29:49 +0000 (14:29 +1000)]
doc/user: quirks are available, not supported

This is a bit nitpicky but let's call the current quirks merely
"available" rather than "supported" since quirks should never be seen as
supported API.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
23 months agotablet: apply pressure offset handling for non-distance tablets
Peter Hutterer [Tue, 13 Jun 2023 03:12:53 +0000 (13:12 +1000)]
tablet: apply pressure offset handling for non-distance tablets

Previously we only applied pressure offset handling for tablets that
supported ABS_DISTANCE. Detecting a pressure offset when the tool
doesn't actually touch the surface is easy after all.

But tablets without distance handling may also have a pressure offset,
so let's try to detect this. This is obviously harder since the pen will
always touch the tablet's surface whenever it is in proximity and thus
will always have *some* pressure applied to it.

The process here is to merely observe the minimum pressure value during
the first two strokes of the pen. On the third prox in, that minimum
pressure value is taken as the offset. If the pressure drops below the
offset, the offset is adjusted downwards [1] so over time we'll
get closer to the pen's real offset.

[1] this is already done for distance tablets too

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
23 months agotablet: split proximity and axis update handling
Peter Hutterer [Wed, 14 Jun 2023 00:59:02 +0000 (10:59 +1000)]
tablet: split proximity and axis update handling

Let's make this two conditions, this is too confusing to read otherwise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
23 months agotablet: split detecting and updating the pressure offset
Peter Hutterer [Tue, 13 Jun 2023 02:49:05 +0000 (12:49 +1000)]
tablet: split detecting and updating the pressure offset

detect_pressure_offset() would previously update an existing offset but
otherwise skip most of the work for any event other than proximity-in
events. This was too hidden, let's split this into two functions - one
to update an existing offset and another one to detect a new offset.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
23 months agotablet: move setting the pressure offset into a helper function
Peter Hutterer [Tue, 13 Jun 2023 00:56:10 +0000 (10:56 +1000)]
tablet: move setting the pressure offset into a helper function

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
23 months agodoc/user: update the udev rule to handle bind/unbind events
Peter Hutterer [Tue, 13 Jun 2023 23:16:27 +0000 (09:16 +1000)]
doc/user: update the udev rule to handle bind/unbind events

Summary: we expect add, change or remove but kernel 4.12 added bind and
unbind. These events were previously discarded by udevd. Our rules should
handle any event *but* remove, so update as suggested in the announce email
linked below.

For a longer explanation, see the system 247rc2 announcement
https://lists.freedesktop.org/archives/systemd-devel/2020-November/045570.ht

See cd37dcfa66d59ecbdf787ee1aa34bb65f2a38b6d where we did this already
for the udev rules we use ourselves.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: check that the pressure offset is reduced during motion events too
Peter Hutterer [Tue, 13 Jun 2023 05:22:26 +0000 (15:22 +1000)]
test: check that the pressure offset is reduced during motion events too

Ensure that if we do get pressure < offset that that offset is reduced
to the current pressure value.

The implementation for this is arguably buggy, reducing the pressure
means we get a tip up event since we now reach 0% of pressure. Arguably
we should enforce the tip staying down and releasing it later but since
this should typically never happen more than once per tool per context
and working around this is a lot of effort, we live with it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: check the tablet pressure values with a helper function
Peter Hutterer [Tue, 13 Jun 2023 04:43:48 +0000 (14:43 +1000)]
test: check the tablet pressure values with a helper function

Makes the code a bit easier to read. Adds precision to some tests,
slightly loosens precision in some other tests but that shouldn't matter
here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: remove a confusing comment
Peter Hutterer [Tue, 13 Jun 2023 03:48:03 +0000 (13:48 +1000)]
test: remove a confusing comment

We don't actually increase the pressure here, so let's not say we do

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agodoc/user: move ignoring devices to separate page
Peter Hutterer [Mon, 12 Jun 2023 03:41:53 +0000 (13:41 +1000)]
doc/user: move ignoring devices to separate page

This is way too hidden to the point where i couldn't find it for quite a
while despite knowing it exists. Move it to an entry under
troubleshooting.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoCODING_STYLE: drop the unintended real name policy
Peter Hutterer [Mon, 12 Jun 2023 03:31:02 +0000 (13:31 +1000)]
CODING_STYLE: drop the unintended real name policy

This was never intended as a true real name policy (and we never
actually interpreted it that way), its purpose is to identify users
and avoid commits from 12345@example.com.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoman: hide debug-gui from the libinput.man page if disabled
Peter Hutterer [Fri, 9 Jun 2023 02:50:57 +0000 (12:50 +1000)]
man: hide debug-gui from the libinput.man page if disabled

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: add a calibrated (swapped) tablet device
Peter Hutterer [Thu, 11 May 2023 04:30:38 +0000 (14:30 +1000)]
test: add a calibrated (swapped) tablet device

Swap any input for both x/y and default to a calibration matrix that
swaps it back. In theory, that device will then behave as every other
device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: add a pre-calibrated flag and exclude the tests as necessary
Peter Hutterer [Thu, 11 May 2023 04:47:20 +0000 (14:47 +1000)]
test: add a pre-calibrated flag and exclude the tests as necessary

Prep work for adding a precalibrated tablet.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: add an extra override hook for tablet motion
Peter Hutterer [Thu, 11 May 2023 03:51:25 +0000 (13:51 +1000)]
test: add an extra override hook for tablet motion

Currently unused but it complements the existing override handlers.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: change tablet coords to doubles and pass the pointer through
Peter Hutterer [Thu, 11 May 2023 03:45:25 +0000 (13:45 +1000)]
test: change tablet coords to doubles and pass the pointer through

All other motion/touch/... coords are already doubles so let's follow
suite here. And passing a pointer into the custom handlers
means we can modify x/y slightly and return false, leaving the rest up
to the generic event handling code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoCI: add a comment to the meson build helper
Peter Hutterer [Tue, 30 May 2023 05:16:31 +0000 (15:16 +1000)]
CI: add a comment to the meson build helper

We now have an upstream for it so we can sync changes between projects.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agodoc/user/timestamps: document which clock is used
Simon Ser [Tue, 9 May 2023 09:18:23 +0000 (11:18 +0200)]
doc/user/timestamps: document which clock is used

Document that all timestamps are given in the CLOCK_MONOTONIC
domain.

Signed-off-by: Simon Ser <contact@emersion.fr>
2 years agoevdev: if a device's rotation is around 180 degrees, flip the wheel
Peter Hutterer [Tue, 18 Apr 2023 06:53:05 +0000 (16:53 +1000)]
evdev: if a device's rotation is around 180 degrees, flip the wheel

For a device used upside-down, make sure the wheels correspond to the
new physical directions. There's a grace range of 20 degrees either way
since that seems like it makes sense.

For 90 degree rotation (or 270 degree) the wheel is left as-is, the
heuristics to guess what angle we want in this case is not clear enough.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agofallback: remove write-only rotation.is_enabled variable
Peter Hutterer [Tue, 18 Apr 2023 05:06:40 +0000 (15:06 +1000)]
fallback: remove write-only rotation.is_enabled variable

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotools: add rotation support to debug-events and debug-gui
Peter Hutterer [Tue, 18 Apr 2023 07:05:41 +0000 (17:05 +1000)]
tools: add rotation support to debug-events and debug-gui

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: carry the step as argument for arg testing
Peter Hutterer [Thu, 27 Apr 2023 01:12:17 +0000 (11:12 +1000)]
test: carry the step as argument for arg testing

Simplifies things a bit since it makes it all more explicit

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoCI: update to use Fedora 38
Peter Hutterer [Wed, 19 Apr 2023 22:59:22 +0000 (08:59 +1000)]
CI: update to use Fedora 38

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotools/debug-gui: fix a deprecated warning
Peter Hutterer [Wed, 19 Apr 2023 23:50:37 +0000 (09:50 +1000)]
tools/debug-gui: fix a deprecated warning

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotools: fix a few scan-build dead store warnings
Peter Hutterer [Wed, 19 Apr 2023 23:35:17 +0000 (09:35 +1000)]
tools: fix a few scan-build dead store warnings

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoCI: fix the rpm build job's Fedora version
Peter Hutterer [Wed, 19 Apr 2023 23:04:28 +0000 (09:04 +1000)]
CI: fix the rpm build job's Fedora version

We have the variable set, we just didn't use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agodoc/user: add a section on natural scrolling
Peter Hutterer [Tue, 18 Apr 2023 03:52:49 +0000 (13:52 +1000)]
doc/user: add a section on natural scrolling

Just for completeness, turns out we were missing that one.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agodoc/user: fix documentation for rotation
Peter Hutterer [Tue, 18 Apr 2023 03:27:36 +0000 (13:27 +1000)]
doc/user: fix documentation for rotation

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotools: add a tool to update our Razer quirks for internal keyboards
Peter Hutterer [Tue, 11 Apr 2023 04:01:03 +0000 (14:01 +1000)]
tools: add a tool to update our Razer quirks for internal keyboards

openrazer keeps a convenient list of keyboard devices that belong to the
RazerBlade line and thus should be marked as internal by us. Let's
use that one.

This script git clones the current openrazer repo, imports the file we
need and then overwrites our current quirks file with the sorted list of
devices.

For the second part of this to work reliable we need a marker in the
quirks file that marks the start of autogenerated entries.

Heavily influenced by @danryu in !887.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoquirks: sort the razer entries by PID
Peter Hutterer [Tue, 11 Apr 2023 04:31:27 +0000 (14:31 +1000)]
quirks: sort the razer entries by PID

No functional changes here, this should help with adding autogenerated
entries since we no longer rely on the source order.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoDisregard touchless clicks on flaky devices
Robert Glossop [Tue, 11 Apr 2023 02:00:52 +0000 (02:00 +0000)]
Disregard touchless clicks on flaky devices

Some touchpads, notably those on the Dell XPS 15 9500, are prone to registering
touchpad clicks when the case is sufficiently flexed. Ignore these by
disregarding any clicks that are registered without touchpad touch.

Signed-off-by: Rob Glossop <robgssp@gmail.com>
2 years agoCI: remove unused meson-prep.sh and meson-test.sh scripts
Peter Hutterer [Thu, 6 Apr 2023 05:39:20 +0000 (15:39 +1000)]
CI: remove unused meson-prep.sh and meson-test.sh scripts

From an earlier version of the b2c patches, before meson-build.sh got
updated to do what's required here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotouchpad: Disable edge palm detection Apple touchpads
Hector Martin [Thu, 6 Apr 2023 06:33:42 +0000 (15:33 +0900)]
touchpad: Disable edge palm detection Apple touchpads

This hurts more than it helps, and users complain of dead trackpad
edges. Apple touchpads have fairly sophisticated internal palm rejection
algorithms going back many years, so let's just disable this one on
everything Apple.

Related to: #433 (need to figure out what other hardware may need this)

Signed-off-by: Hector Martin <marcan@marcan.st>
2 years agoevdev: Enable natural scrolling by default on Apple
Hector Martin [Sat, 10 Dec 2022 10:40:07 +0000 (19:40 +0900)]
evdev: Enable natural scrolling by default on Apple

As suggested by the comment itself. I think most users expect this.

Signed-off-by: Hector Martin <marcan@marcan.st>
2 years agodoc/user: the CI uses FEDORA_PACKAGES, not FEDORA_RPMS
Peter Hutterer [Mon, 3 Apr 2023 22:56:12 +0000 (08:56 +1000)]
doc/user: the CI uses FEDORA_PACKAGES, not FEDORA_RPMS

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotablet: always enable touch arbitration with touchscreens/ext. touchpads
Peter Hutterer [Fri, 17 Mar 2023 03:08:31 +0000 (13:08 +1000)]
tablet: always enable touch arbitration with touchscreens/ext. touchpads

Right now for touch arbitration to work, we require the device group to
be the same (i.e. they're hanging off the same physical bus). That's not
always the case and statistically we have a lot more devices that have
a built-in tablet + touchscreen than we have Intuos-like external
tablets.

So let's default to the more common case - enabling arbitration with the
first touchscreen/external touchpad we find. If a subsequent device is
"better", swap it out. Right now, the only heuristic we have here is the
device group check but in the future we could get more precise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotablet: split out arbitration/rotation handling assignment
Peter Hutterer [Wed, 29 Mar 2023 02:40:56 +0000 (12:40 +1000)]
tablet: split out arbitration/rotation handling assignment

No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: move arbitration test into a helper function
Peter Hutterer [Fri, 17 Mar 2023 03:21:47 +0000 (13:21 +1000)]
test: move arbitration test into a helper function

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agofallback: don't double-map if any left-handed buttons are down
Peter Hutterer [Wed, 29 Mar 2023 00:56:41 +0000 (10:56 +1000)]
fallback: don't double-map if any left-handed buttons are down

The key_count array for buttons records the logical button sent to the
client - for left-handed configurations that means a BTN_LEFT is
recorded as BTN_RIGHT.

When the device is suspended and we are releasing all keys we must thus
release the button code as-is without trying to map it again.

Fixes #881

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoCI: bump to latest ci-templates for a new ci-fairy
Peter Hutterer [Wed, 29 Mar 2023 04:05:39 +0000 (14:05 +1000)]
CI: bump to latest ci-templates for a new ci-fairy

This version includes the (possible) fix for our CI picking up the wrong
range in the commit checks and failing the pipeline.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: minor cleanups
Peter Hutterer [Wed, 29 Mar 2023 00:59:45 +0000 (10:59 +1000)]
test: minor cleanups

A whitespace fix, moving a check-related #define closer to the #include
and change a test that doesn't need a device to litest_add_no_device().

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agodoc: document libinput_device_tablet_pad_get_* error case
José Expósito [Sat, 25 Mar 2023 18:33:05 +0000 (19:33 +0100)]
doc: document libinput_device_tablet_pad_get_* error case

Like in libinput_device_switch_has_switch()'s documentation, document
the error case in libinput_device_tablet_pad_get_num_buttons(),
libinput_device_tablet_pad_get_num_rings() and
libinput_device_tablet_pad_get_num_strips().

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2 years agolibinput 1.23.0 1.23.0
José Expósito [Sat, 25 Mar 2023 17:59:47 +0000 (18:59 +0100)]
libinput 1.23.0

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2 years agoquirks: add a bunch more Razer internal keyboards
Peter Hutterer [Thu, 23 Mar 2023 00:31:09 +0000 (10:31 +1000)]
quirks: add a bunch more Razer internal keyboards

Generated with the same script as the list from
commit 3dcfae3fb699bc72c34099f5a567a61e075971b5.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: add a test to make sure we don't accidentally add Logitech receivers
Peter Hutterer [Mon, 20 Mar 2023 00:31:26 +0000 (10:31 +1000)]
test: add a test to make sure we don't accidentally add Logitech receivers

IDs copied over from libratbag which has that same check, with C548
added.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: add a quicks file validation test
Peter Hutterer [Sun, 19 Mar 2023 23:17:39 +0000 (09:17 +1000)]
test: add a quicks file validation test

Now that we're Python ConfigParser compatible (again), we can check our
quirks file for things our actual parser doesn't care about, but that we
should honour. Right now that means that bustypes and vid/pid matches are
all spelled consistently.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotouchpad: rm dead tp_palm_tap_is_palm
Tobias Bengfort [Fri, 17 Mar 2023 10:55:49 +0000 (11:55 +0100)]
touchpad: rm dead tp_palm_tap_is_palm

This was added in 39f11253471500cd380c8977b8cbe0683abe6b1d
(https://bugs.freedesktop.org/show_bug.cgi?id=89625)

Later, a more sophisticated palm detection was implemented in
46eab97538af18381243f5337bf3d29e4b21098f
(https://bugs.freedesktop.org/show_bug.cgi?id=103210)

The only place where `tp_palm_tap_is_palm()` is called is if the more
sophisticated palm detection has already decided that this is not a palm,
so it should never return true.

Signed-off-by: Tobias Bengfort <tobias.bengfort@posteo.de>
2 years agotest: comment two tap tests
Peter Hutterer [Wed, 22 Mar 2023 06:15:23 +0000 (16:15 +1000)]
test: comment two tap tests

This is confusing without any explanation - the first set of touches is
within the edge zone, the second set of touches is explicitly within the
software button area but not inside the edge zone. Let's add comments so
the intention is clear.

Same-ish for the clickfinger test.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoCI: make the ci-fairy commit check verbose
Peter Hutterer [Wed, 22 Mar 2023 04:24:18 +0000 (14:24 +1000)]
CI: make the ci-fairy commit check verbose

This way it prints the commit range which should help debug why it fails
when it does.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotest: drop the explicit -n auto to the tool options test
Peter Hutterer [Mon, 20 Mar 2023 00:08:23 +0000 (10:08 +1000)]
test: drop the explicit -n auto to the tool options test

This script adds the option automatically where xdist is available.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agotools: honor FDO_CI_CONCURRENT in the tools option parser
Peter Hutterer [Sun, 19 Mar 2023 23:18:30 +0000 (09:18 +1000)]
tools: honor FDO_CI_CONCURRENT in the tools option parser

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoquirks: change all 3-digit matches to zero-prefixed 4-digit matches
Peter Hutterer [Sun, 19 Mar 2023 23:14:34 +0000 (09:14 +1000)]
quirks: change all 3-digit matches to zero-prefixed 4-digit matches

Time to get some standardization here!

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoquirks: fix duplicate section names
Peter Hutterer [Sun, 19 Mar 2023 23:06:22 +0000 (09:06 +1000)]
quirks: fix duplicate section names

Our parser doesn't care about this, but let's stick to the proper format so
we can read those files with e.g. Python's ConfigParser

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoquirks: add a note to not quirk the Bolt Receiver
José Expósito [Sun, 19 Mar 2023 11:34:08 +0000 (12:34 +0100)]
quirks: add a note to not quirk the Bolt Receiver

The Logitech Bolt Receiver can be used with multiple mice, but the
kernel exposes the same product ID for all of them.

Adding a quirk for the device trying to fix a specific mouse would
break other mice.

Since we avoided this problem during code review a couple of times [1]
[2] add a warning to avoid it in the future.

[1] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/867#note_1759931
[2] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/847#note_1725364
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2 years agodoc/user: fix tap in palm exclusion zone
Tobias Bengfort [Fri, 17 Mar 2023 11:22:12 +0000 (12:22 +0100)]
doc/user: fix tap in palm exclusion zone

See 211bed2c25e4282820e5155191d4dc09201f1210 and
79139ebcd1cc81eecdd2d0dc6f006fbec4c2c6f2

Signed-off-by: Tobias Bengfort <tobias.bengfort@posteo.de>
2 years agotest: give the generic MT touchscreen realistic ranges
Peter Hutterer [Fri, 17 Mar 2023 03:41:40 +0000 (13:41 +1000)]
test: give the generic MT touchscreen realistic ranges

This way we can rely on physical coords on this screen being actually
meaningful. Not currently in use but future tests will use this touch
device as generic screen.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoCI: add new workflow rules
Peter Hutterer [Tue, 14 Mar 2023 23:28:12 +0000 (09:28 +1000)]
CI: add new workflow rules

Required for pipelines to run after some infrastructure changes, see
https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoCI: update to latest ci-templates
Peter Hutterer [Tue, 14 Mar 2023 23:30:11 +0000 (09:30 +1000)]
CI: update to latest ci-templates

The commit fixes linebreaks at the end of the files for files generated
with ci-fairy generate-templates.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agofilter: add scroll movement type to the custom acceleration profile
Yinon Burgansky [Sat, 18 Feb 2023 19:12:13 +0000 (21:12 +0200)]
filter: add scroll movement type to the custom acceleration profile

Adds a dedicated scroll movement type to the custom acceleration profile.
Supported by physical mouse and touchpad.
Other profiles remain the same by using the same unaccelerated filter for the scroll filter.

Signed-off-by: Yinon Burgansky <51504-Yinon@users.noreply.gitlab.freedesktop.org>
2 years agoquirks: fix DWT on Legion 5i
José Expósito [Sun, 12 Feb 2023 18:32:16 +0000 (19:32 +0100)]
quirks: fix DWT on Legion 5i

The keyboard present on this device is not recognized as internal and
disable while typing does not work.

Add a quirk to fix this feature.

Fix https://gitlab.freedesktop.org/libinput/libinput/-/issues/848
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2 years agogitlab CI: explicitly run the test in the systemd service
Peter Hutterer [Wed, 4 Jan 2023 06:17:23 +0000 (16:17 +1000)]
gitlab CI: explicitly run the test in the systemd service

This shouldn't have functional changes because MESON_TEST_ARGS was set
for all our b2c/qemu tests and thus the tests would run automatically.
To make this script more generic, specify --run-test explicitly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agogitlab CI: remove a leftover use of a fedora image
Peter Hutterer [Wed, 4 Jan 2023 05:05:31 +0000 (15:05 +1000)]
gitlab CI: remove a leftover use of a fedora image

This is overridden by the template users anyway

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agogitlab CI: drop comment about weekly rebuild of images
Peter Hutterer [Wed, 4 Jan 2023 04:47:25 +0000 (14:47 +1000)]
gitlab CI: drop comment about weekly rebuild of images

This was disabled many moons ago, pre the b2c work.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoCI: bump to use Fedora 37
Peter Hutterer [Sun, 12 Feb 2023 23:06:13 +0000 (09:06 +1000)]
CI: bump to use Fedora 37

This was delayed by https://github.com/systemd/systemd/pull/25941 which
is now available in F37 as of v251.11

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoadd quirks for Logitech MX Master 3B
Aksel Stokseth [Tue, 7 Feb 2023 15:11:09 +0000 (16:11 +0100)]
add quirks for Logitech MX Master 3B

Signed-off-by: Aksel Stokseth aksel.stokseth@gmail.com
2 years agoCI: bump b2c and kernel
Benjamin Tissoires [Wed, 8 Feb 2023 10:36:17 +0000 (11:36 +0100)]
CI: bump b2c and kernel

Same than https://gitlab.freedesktop.org/libevdev/libevdev/-/merge_requests/106
We need to upgrade to a newer boot2container

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2 years agofilter: simplify speed_factor()
Tobias Bengfort [Wed, 8 Feb 2023 10:56:48 +0000 (10:56 +0000)]
filter: simplify speed_factor()

The `speed_factor()` formula is unnecessarily complex, The behavior that is described in the comment can be achieved with a simple power function.

And adjust the comment to explicitly state that 0.05 is the minimum.

2 years agoquirks: Dell Mayabay (Pressure Pad).
Marge Yang [Wed, 8 Feb 2023 06:24:53 +0000 (01:24 -0500)]
quirks: Dell Mayabay (Pressure Pad).

Signed-off-by: Marge Yang <marge.yang@synaptics.corp-partner.google.com>
2 years agoevdev: apply calibration for touch arbitration
hrdl [Thu, 2 Feb 2023 06:52:40 +0000 (07:52 +0100)]
evdev: apply calibration for touch arbitration

Rectangle-based touch arbitration should respect calibration. This
fixes #853.

Signed-off-by: hrdl <git@hrdl.eu>
2 years agoevdev-tablet: clip touch arbitration rectangle
hrdl [Tue, 7 Feb 2023 10:19:35 +0000 (11:19 +0100)]
evdev-tablet: clip touch arbitration rectangle

Previously the arbitration rectangle would be moved to lie completely in
the first quadrant of the coordinate system.

Signed-off-by: hrdl <51402-hrdl@users.noreply.gitlab.freedesktop.org>
2 years agoquirk: Google Chromebook Atlas (Pixelbook go)
gogogoghost [Sun, 5 Feb 2023 08:31:18 +0000 (16:31 +0800)]
quirk: Google Chromebook Atlas (Pixelbook go)

Signed-off-by: Jax Leach <heiguiyj@gmail.com>
2 years agotools: add --replay-after and --once to libinput replay
Peter Hutterer [Fri, 3 Feb 2023 04:16:27 +0000 (14:16 +1000)]
tools: add --replay-after and --once to libinput replay

For the cases where it's not possible to hit enter to start the replay
because e.g. we cannot change focus, etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoquirks: add generic quirk for Dell 2-in-1 models for side volume buttons
Bill A [Mon, 6 Feb 2023 17:46:01 +0000 (17:46 +0000)]
quirks: add generic quirk for Dell 2-in-1 models for side volume buttons

Signed-off-by: Bill A's avatarBill A <vukk.euob@gmail.com>
2 years agofilter: validate custom acceleration function's points size
Yinon Burgansky [Thu, 26 Jan 2023 23:23:35 +0000 (01:23 +0200)]
filter: validate custom acceleration function's points size

Adds min and max size limit for custom acceleration function's points.
Adds tests to make sure validation works properly.

Signed-off-by: Yinon Burgansky <51504-Yinon@users.noreply.gitlab.freedesktop.org>
2 years agoquirk: Lenovo P14s Gen 1 AMD Trackpoint
Diep Pham [Sat, 28 Jan 2023 16:06:06 +0000 (16:06 +0000)]
quirk: Lenovo P14s Gen 1 AMD Trackpoint

2 years agodoc/user: fix trackpoint quirks path
José Expósito [Mon, 23 Jan 2023 18:26:12 +0000 (19:26 +0100)]
doc/user: fix trackpoint quirks path

Fix a small typo in the file name.

Fix https://gitlab.freedesktop.org/libinput/libinput/-/issues/851
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2 years agofix: add apple m2 keyboard quirks
Cyril LEVIS [Mon, 23 Jan 2023 08:55:08 +0000 (09:55 +0100)]
fix: add apple m2 keyboard quirks

this fix dwt https://github.com/AsahiLinux/linux/issues/103

Signed-off-by: Cyril Levis <git@levis.name>
2 years agoImprove X280 support
Richard Stefun [Mon, 23 Jan 2023 14:00:53 +0000 (15:00 +0100)]
Improve X280 support

Signed-off-by: Richard Stefun <richard.stefun@icloud.com>
2 years agoquicks: invert horizontal scrolling for Logitech MX Master 3S
Zhangyuan Nie [Tue, 17 Jan 2023 02:43:46 +0000 (18:43 -0800)]
quicks: invert horizontal scrolling for Logitech MX Master 3S

Signed-off-by: Zhangyuan Nie <yuan@znie.org>
2 years agodoc/user: fix sphinx warning
Peter Hutterer [Tue, 17 Jan 2023 02:28:58 +0000 (12:28 +1000)]
doc/user: fix sphinx warning

WARNING: extlinks: Sphinx-6.0 will require a caption string to contain
exactly one '%s' and all other '%' need to be escaped as '%%'.

Well, let's do that then!

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoIntroduce custom acceleration profile
Yinon Burgansky [Mon, 12 Dec 2022 22:23:59 +0000 (00:23 +0200)]
Introduce custom acceleration profile

The custom acceleration profile allow the user to define custom
acceleration functions for each movement type per device, giving
full control over accelerations behavior at different speeds.

This commit introduces 2 movement types which corresponds to the
2 profiles currently in use by libinput.

regular filter is Motion type.
constant filter is Fallback type.

This allows possible expansion of new movement types for the
different devices.

The custom pointer acceleration profile gives the user full control over the
acceleration behavior at different speeds.
The user needs to provide a custom acceleration function f(x) where
the x-axis is the device speed and the y-axis is the pointer speed.

The user should take into account the native device dpi and screen dpi in
order to achieve the desired behavior/feel of the acceleration.

The custom acceleration function is defined using n points which are spaced
uniformly along the x-axis, starting from 0 and continuing in constant steps.
There by the points defining the custom function are:
(0 * step, f[0]), (1 * step, f[1]), ..., ((n-1) * step, f[n-1])
where f is a list of n unitless values defining the acceleration
factor for each velocity.
When a velocity value does not lie exactly on those points, a linear
interpolation of the two closest points will be calculated.
When a velocity value is greater than the max point defined, a linear
extrapolation of the two biggest points will be calculated.

Signed-off-by: Yinon Burgansky <51504-Yinon@users.noreply.gitlab.freedesktop.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agodoc/api: set HAVE_DOT to YES
Peter Hutterer [Tue, 10 Jan 2023 03:23:56 +0000 (13:23 +1000)]
doc/api: set HAVE_DOT to YES

dot is required in meson.build, so we can hardcoded it here

Fixes: libinput/build/doc/api/libinput.h:4087: warning: ignoring \dot command because HAVE_DOT is not set
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agofilter: add helper functions to create/destroy a delta smoothener
Peter Hutterer [Tue, 22 Nov 2022 01:34:06 +0000 (11:34 +1000)]
filter: add helper functions to create/destroy a delta smoothener

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoquirks: touchpad: add ModelPressurePad
José Expósito [Mon, 16 Jan 2023 18:18:40 +0000 (19:18 +0100)]
quirks: touchpad: add ModelPressurePad

Unlike in traditional touchpads, whose pressure value equals contact
size, on pressure pads pressure is a real physical axis.

We don't take advantage of the pressure information reported by
pressure pads yet, so we disable it to avoid errors.

Add a new model quirk for pressure pads instead of disabling
ABS_MT_PRESSURE and ABS_PRESSURE.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2 years agotools: fflush the output in debug-events after each set of events
Peter Hutterer [Thu, 12 Jan 2023 23:23:52 +0000 (09:23 +1000)]
tools: fflush the output in debug-events after each set of events

Fixes e.g. the case where debug-events is used to get the initial device
list but no more. Since we never flush, the content is stuck in the
buffers and gets lost.

Easy way to reproduce: `libinput debug-events | cat`, then ctrl+c and see
nothing show up (before this patch, anyway).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2 years agoquirks: add quirks for Dell Precision5680 Touchpad
Charles Wang [Wed, 11 Jan 2023 09:16:13 +0000 (17:16 +0800)]
quirks: add quirks for Dell Precision5680 Touchpad

This touchpad is a pressure pad and needs the pressure
handling disable.

Fixes https://gitlab.freedesktop.org/libinput/libinput/-/issues/849

Signed-off-by: Charles Wang <charles.goodix@gmail.com>