Commit graph

4804 commits

Author SHA1 Message Date
Peter Hutterer
c739cc7b41 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>
2023-02-13 09:43:47 +10:00
Peter Hutterer
9a12a447ec 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>
2023-02-13 09:43:47 +10:00
Peter Hutterer
ba3ddc9e2d 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>
2023-02-13 09:07:00 +10:00
Aksel Stokseth
9764d1f362 add quirks for Logitech MX Master 3B
Signed-off-by: Aksel Stokseth aksel.stokseth@gmail.com
2023-02-09 04:59:51 +00:00
Benjamin Tissoires
c40286bbf4 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>
2023-02-08 11:01:13 +00:00
Tobias Bengfort
9bb2136bab 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.
2023-02-08 10:56:48 +00:00
Marge Yang
74415b13fb quirks: Dell Mayabay (Pressure Pad).
Signed-off-by: Marge Yang <marge.yang@synaptics.corp-partner.google.com>
2023-02-08 08:05:37 +00:00
hrdl
5d7fc54c22 evdev: apply calibration for touch arbitration
Rectangle-based touch arbitration should respect calibration. This
fixes #853.

Signed-off-by: hrdl <git@hrdl.eu>
2023-02-08 03:57:18 +00:00
hrdl
1e64d52fe9 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>
2023-02-07 11:26:27 +01:00
gogogoghost
c855012ddb quirk: Google Chromebook Atlas (Pixelbook go)
Signed-off-by: Jax Leach <heiguiyj@gmail.com>
2023-02-06 18:23:31 +00:00
Peter Hutterer
41e7caac48 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>
2023-02-06 18:02:58 +00:00
Bill A
bb21327efe 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>
2023-02-06 17:46:01 +00:00
Yinon Burgansky
886f1c6767 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>
2023-02-02 04:56:18 +00:00
Diep Pham
32c0af17f0 quirk: Lenovo P14s Gen 1 AMD Trackpoint 2023-01-28 16:06:06 +00:00
José Expósito
f668e827e4 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>
2023-01-23 18:44:59 +00:00
Cyril LEVIS
32c9bdcccc fix: add apple m2 keyboard quirks
this fix dwt https://github.com/AsahiLinux/linux/issues/103

Signed-off-by: Cyril Levis <git@levis.name>
2023-01-23 18:23:13 +00:00
Richard Stefun
6e1be53df5 Improve X280 support
Signed-off-by: Richard Stefun <richard.stefun@icloud.com>
2023-01-23 15:17:08 +01:00
Zhangyuan Nie
3b1f86c7c6 quicks: invert horizontal scrolling for Logitech MX Master 3S
Signed-off-by: Zhangyuan Nie <yuan@znie.org>
2023-01-17 06:40:06 +00:00
Peter Hutterer
bf2e8a406e 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>
2023-01-17 12:29:25 +10:00
Yinon Burgansky
5324f425a1 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>
2023-01-17 01:46:17 +00:00
Peter Hutterer
ee3330491d 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>
2023-01-17 10:54:10 +10:00
Peter Hutterer
d199c6d8c1 filter: add helper functions to create/destroy a delta smoothener
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-17 10:51:33 +10:00
José Expósito
1d7172488d 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>
2023-01-16 19:22:04 +01:00
Peter Hutterer
0266428c93 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>
2023-01-13 09:28:32 +10:00
Charles Wang
29a49e968e 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>
2023-01-12 10:02:35 +08:00
Peter Hutterer
31ecda7008 CI: use meson compile over ninja directly in meson-build.sh
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-06 10:16:33 +00:00
Peter Hutterer
48a1c47bc2 CI: make the meson-build.sh script even more generic
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-06 10:16:33 +00:00
Peter Hutterer
a858ed01b8 CI: give the meson-build.sh script a proper license tag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-06 10:16:33 +00:00
Peter Hutterer
54eea68296 meson.build: fix a deprecation warning
get_pkgconfig_variable is deprecated

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-06 13:22:07 +10:00
José Expósito
f185120936 quirks: add quirk for Dell Latitude 5290 2-in-1
Fixes https://gitlab.freedesktop.org/libinput/libinput/-/issues/846
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2023-01-01 16:40:01 +01:00
Samuel Reddy
aed3fdb94b quirks: add quirks for Glorious Model O mouse
Signed-off-by: Samuel Reddy <samuelsumukhreddy@gmail.com>
2022-12-23 19:13:10 +11:00
José Expósito
7bfdf52db2 tools/record: fix quirk error message
When libinput-record fails to parse the quirks, it suggest to use the
--verbose flag to get more details. However, libinput-record does not
support the --verbose flag.

Replace the error message and add a link to the documentation instead.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-12-12 19:17:01 +01:00
Simon Ser
ea9db278f3 build: override dependency for use as subproject
Allows e.g. compositors to setup libinput as a subproject. Makes
it easier to ad support for libinput features which haven't been
released yet.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-12-09 11:17:33 +01:00
Peter Hutterer
69fe6f37cd doc/user: document the new list-kernel-devices tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-12-09 13:16:38 +10:00
Peter Hutterer
e6a5c4e175 tools: add a --hid toggle to libinput-list-kernel-devices
Lists all SUBSYSTEM=hid devices, including the respective hidraw and
evdev nodes.

Note that this takes a shortcut in the udev handling: in theory we
*should* compare the hidraw/evdev parent device with our hid device. In
practice, checking if the devpath starts with the same substring is good
enough.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-12-08 10:08:44 +10:00
Peter Hutterer
1250407c7c tools: add a libinput list-kernel-devices tool
Same as libinput list-devices, but lists the available event nodes. This
effectively does the same as libinput record without arguments but it's
more obvious in what it is supposed to do and thus easier to point to.

Also, it uses pyudev instead of libevdev so it does not need to run as
root to discover devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-12-08 10:08:44 +10:00
Lucas Zampieri
fb8d285566 Allow rotation on all mice and for any angle
Previously we restricted rotation to trackballs only and to multiples 
of 90 degrees. Update rotation allow angles other than multiples of 90.

Also enable rotation on all mice. The only devices without rotation
are now pointing sticks.

Fixes #827

Signed-off-by: Lucas Zampieri <lzampier@redhat.com>
2022-12-05 22:57:51 +00:00
Peter Hutterer
38dbfe41a1 evdev: only read the trackpoint multiplier on trackpoints
Check the tag before we read any multiplier quirks. And don't bother
reading the DPI for trackpoints either because it doesn't make sense for
those devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-12-05 14:38:25 +10:00
José Expósito
3fd9b3fbc6 quirks: add quirks for Positivo-Vaio touchpad
The generic quirk introduced in commit d1f274c781 ("quirks: add a
more generic match for the 5288 Synaptics clickpad") affects the
touchpad (with physical buttons) present in the Positivo-Vaio.

Fixes #819
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-11-28 11:26:47 +01:00
Peter Hutterer
a7e4cbc212 quirks: allow overriding of AttrEventCode and AttrInputProp
This switches the quirk from AttrEventCodeEnable/Disable to just
AttrEventCode with a +/- prefix for each entry.
This switches the quirk from AttrInputPropEnable/Disable to just
AttrInputProp with a +/- prefix for each entry.

Previously, both event codes and input props would only apply the
last-matching section entry for a device. Furthermore, an earlier Disable entry
would take precedence over a later Enable entry. For example, a set of
sections with these lines *should* enable left, right and middle:

  [first]
  AttrEventCodeEnable=BTN_LEFT;BTN_RIGHT;BTN_MIDDLE

  [second]
  AttrEventCodeDisable=BTN_RIGHT

  [third]
  AttrEventCodeEnable=BTN_LEFT;BTN_RIGHT;

Alas: the first line was effectively ignored (quirks only returned the
last-matching one, i.e. the one from "third"). And due to implementation
details in evdev.c, the Disable attribute was processed after Enable,
i.e. the device was enabled for left + right and then disabled for
right. As a result, the device only had BTN_LEFT enabled.

Fix this by changing the attribute to carry both enable/disable
information and merging the commands together.

Internally, all quirks matching a device are simply ref'd into an array
in the struct quirks. The applied value is simply the last entry in the
array corresponding to our quirk.

For AttrEventCode and AttrInputProp instead do this:
- switch them to a tuple with the code as first entry and a boolean
  enable/disable as second entry
- if the struct quirk already has an entry for either, append the more
  recent one to the existing entry (instead of creating a new entry in
  the array). This way we have all entries that match and in-order of
  precedence - i.e. we can process them left-to-right to end up
  with the right state.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-28 08:25:41 +10:00
Peter Hutterer
bb6ff0ec00 gitlab CI: add a job to check for whitespace issues
Trailing whitespaces and tab after a space are a no-go.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-25 10:08:20 +10:00
Peter Hutterer
6ae0d1bac4 tools: fix a tab after space whitespace issue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-25 10:08:20 +10:00
Peter Hutterer
a5dd45e8ce Remove duplicate empty lines in our source
We only touch src and tools, imported headers from include are not ours
to change.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-25 10:08:20 +10:00
Peter Hutterer
d2f6773831 Remove a few empty lines with nothing but a lonely tab
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-25 10:08:20 +10:00
Peter Hutterer
703ecb200c Remove trailing whitespaces in the tree
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-25 10:08:20 +10:00
José Expósito
96e57b5eff tablet: increase touch arbitration rectangle height
A user was experiencing issues with their hand being recognized as
touch input above the stylus tip.

Since touch above the stylus should be rare, increase the touch
arbitration rectangle height by 50mm.

Fix: https://gitlab.freedesktop.org/libinput/libinput/-/issues/809
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-11-23 22:39:02 +00:00
José Expósito
8a6ca3c1c5 sparse: make some variables static
When compiling with Sparse enabled:

	$ CC=cgcc meson builddir

Fix warnings about variables that should be made static.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-11-23 21:57:28 +00:00
José Expósito
41e61c1c13 test: fix uninitialized variables
Fix the warnings generated:

	[232/243] Compiling C object libinput-test-suite.p/test_test-pad.c.o
	../test/test-pad.c:211:3: warning: variable 'count' is uninitialized
	when used here [-Wuninitialized]
		        count++;
		        ^~~~~
	../test/test-pad.c:261:3: warning: variable 'count' is uninitialized
	when used here [-Wuninitialized]
		        count++;
		        ^~~~~

When building with Clang v15 and without libwacom:

	$ CC=clang CXX=clang++ meson builddir -Dlibwacom=false

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-11-23 18:50:38 +01:00
José Expósito
3726de351d test: fix compiler warning when -Dlibwacom=false
Fix the warning generated:

	[129/243] Compiling C object libinput-test-suite.p/test_test-touchpad.c.o
	../test/test-touchpad.c:2679:1: warning: unused
	function 'touchpad_has_rotation' [-Wunused-function]
	touchpad_has_rotation(struct libevdev *evdev)
	^

When building with Clang v15 and without libwacom:

	$ CC=clang CXX=clang++ meson builddir -Dlibwacom=false

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-11-23 18:47:32 +01:00
José Expósito
d84fc4ad11 tablet: fix compiler warning when -Dlibwacom=false
Fix the warning generated:

	[82/243] Compiling C object libinput.so.10.13.0.p/src_evdev-tablet.c.o
	../src/evdev-tablet.c:938:1: warning: unused function
	'tool_set_bits_from_libwacom' [-Wunused-function]
	tool_set_bits_from_libwacom(const struct tablet_dispatch *tablet,
	^

When building with Clang v15 and without libwacom:

	$ CC=clang CXX=clang++ meson builddir -Dlibwacom=false

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-11-23 18:42:34 +01:00