Commit graph

4872 commits

Author SHA1 Message Date
Llerraf Gnem
38fdfd1dfe
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
2023-07-26 11:41:34 -05:00
Peter Hutterer
f617b414fb 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>
2023-07-21 09:08:46 +10:00
Peter Hutterer
35a237e24c 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>
2023-07-19 14:19:08 +10:00
Peter Hutterer
2ebb6f629f 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>
2023-07-18 16:05:13 +10:00
Peter Hutterer
3fb876a49d 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>
2023-07-17 09:32:24 +10:00
Peter Hutterer
9bd0604ea3 Add a triage policy for kernel bugs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-07-04 13:52:44 +10:00
Peter Hutterer
51875324e0 Add triage policies for merge requests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-07-04 12:14:12 +10:00
Peter Hutterer
b39145e468 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>
2023-06-29 03:32:05 +00:00
Peter Hutterer
a244b9e32b 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>
2023-06-23 05:21:51 +00:00
Peter Hutterer
ecf02deb17 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>
2023-06-23 05:21:51 +00:00
Peter Hutterer
eea10aef47 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>
2023-06-23 05:21:51 +00:00
Peter Hutterer
71f5dc6e23 tablet: move setting the pressure offset into a helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-23 05:21:51 +00:00
Peter Hutterer
a88d107c0d 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 cd37dcfa66 where we did this already
for the udev rules we use ourselves.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-15 03:31:30 +00:00
Peter Hutterer
6f10f01af2 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>
2023-06-14 10:46:24 +10:00
Peter Hutterer
24cf215f54 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>
2023-06-13 15:24:43 +10:00
Peter Hutterer
684ac6b0c2 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>
2023-06-13 13:50:10 +10:00
Peter Hutterer
65c71fd6b4 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>
2023-06-12 13:50:25 +00:00
Peter Hutterer
d159799637 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>
2023-06-12 15:05:34 +10:00
Peter Hutterer
83144a0edc man: hide debug-gui from the libinput.man page if disabled
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-09 13:00:08 +10:00
Peter Hutterer
9a3429f4af 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>
2023-06-07 09:23:05 +10:00
Peter Hutterer
bc18b18e32 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>
2023-06-07 09:23:05 +10:00
Peter Hutterer
44de3ff367 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>
2023-06-07 09:23:05 +10:00
Peter Hutterer
160b062454 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>
2023-06-07 09:23:05 +10:00
Peter Hutterer
4bdec007ba 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>
2023-05-30 15:17:14 +10:00
Simon Ser
57a2339779 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>
2023-05-09 11:18:23 +02:00
Peter Hutterer
d3481c8807 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>
2023-04-27 13:15:14 +10:00
Peter Hutterer
64af4beb6b fallback: remove write-only rotation.is_enabled variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-27 13:15:14 +10:00
Peter Hutterer
bee70901ec tools: add rotation support to debug-events and debug-gui
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-27 13:15:14 +10:00
Peter Hutterer
a328ada6ef 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>
2023-04-27 13:15:14 +10:00
Peter Hutterer
a9f4fdde0e CI: update to use Fedora 38
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-20 09:51:49 +10:00
Peter Hutterer
861f01928a tools/debug-gui: fix a deprecated warning
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-20 09:51:49 +10:00
Peter Hutterer
c1ab44c566 tools: fix a few scan-build dead store warnings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-20 09:51:49 +10:00
Peter Hutterer
b4cf6e9baf 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>
2023-04-20 09:04:57 +10:00
Peter Hutterer
8e34037dcd 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>
2023-04-18 16:54:57 +10:00
Peter Hutterer
7073a39ec0 doc/user: fix documentation for rotation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-18 16:54:57 +10:00
Peter Hutterer
2432b6eeff 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>
2023-04-11 14:48:41 +10:00
Peter Hutterer
8a01c3423d 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>
2023-04-11 14:43:46 +10:00
Robert Glossop
57f0354ee5 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>
2023-04-11 02:00:52 +00:00
Peter Hutterer
7c84fb87e9 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>
2023-04-11 00:13:08 +00:00
Hector Martin
4a8b5e6ec4 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>
2023-04-06 16:34:20 +09:00
Hector Martin
d61d385951 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>
2023-04-06 15:30:14 +09:00
Peter Hutterer
7ae3713a77 doc/user: the CI uses FEDORA_PACKAGES, not FEDORA_RPMS
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-04-04 08:56:47 +10:00
Peter Hutterer
898f80fa37 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>
2023-03-30 05:53:23 +00:00
Peter Hutterer
c26c05b255 tablet: split out arbitration/rotation handling assignment
No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-03-30 05:53:23 +00:00
Peter Hutterer
7e1ab13f89 test: move arbitration test into a helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-03-30 05:53:23 +00:00
Peter Hutterer
01a02d4033 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>
2023-03-29 16:37:24 +10:00
Peter Hutterer
41b16e6e4f 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>
2023-03-29 06:03:04 +00:00
Peter Hutterer
40869bf11e 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>
2023-03-29 11:14:27 +10:00
José Expósito
f8497bf176 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>
2023-03-25 19:33:05 +01:00
José Expósito
0b005eb64b libinput 1.23.0
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2023-03-25 18:59:47 +01:00