Commit graph

444 commits

Author SHA1 Message Date
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
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
Peter Hutterer
5db44d9b68 doc/user: explicitly specify language as en
Unlikely we'll ever have the docs fully translated (or translated at
all...) anyway.

Fixes "WARNING: Invalid configuration value found: 'language = None'.
Update your configuration to a valid language code. Falling back to 'en'
(English)."

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-11-22 14:26:44 +10:00
Peter Hutterer
91610165d9 doc/user: minor rewording of the pointer accel profile list
This just makes it easier to add new profiles to the list without ending
up with a word salad.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-07-15 10:47:13 +10:00
Alexander Courtis
e0813f4825 AttrLidSwitchReliability quirk default unreliable->reliable 2022-04-26 01:55:22 +00:00
Peter Hutterer
3d064a07f8 doc/user: add a page to troubleshoot right-click Clickpads
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-03-28 23:25:26 +00:00
Peter Hutterer
423bb6455f meson: replace a meson.source_root() with the explicit directory
Removes the warning that source_root() has been deprecated since 0.56.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-03-28 21:41:58 +00:00
Peter Hutterer
f917661980 meson: fix a meson warning
run_command() wants a check kwarg now:

WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-03-28 21:41:58 +00:00
pudiva chip líquida
1f1ddbc6df touchpad: new option dwtp (disable-while-trackpointing)
Add option to control whether the touchpad should be disabled while the
trackpoint is in use.

Fix #731

Signed-off-by: pudiva chip líquida <pudiva@skylittlesystem.org>
2022-03-08 01:33:40 +00:00
José Expósito
dc86d66a32 doc/user: clarify fork visibility
Clarify that when forking libinput the public visibility level should be
selected. Otherwise, CI pipelines will fail on merge requests.

Also, update the fork URL.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-02-14 19:30:34 +01:00
Peter Hutterer
6914b41de5 doc: correct the documentation for reporting trackpoint bugs
libinput measure trackpoint-range was removed in 1.12

Fixes #734

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-02-11 07:45:40 +00:00
José Expósito
e9ccd4f402 doc: document disambiguation between two finger pinch and scroll
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2022-01-27 08:35:30 +01:00
Peter Hutterer
00e0c17688 doc/user: write an article explaining the different contexts
This is a common question I need to answer, let's make this a link I can
copy/paste instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-12-13 10:35:24 +10:00
José Expósito
556e4114b8 doc/user: fix broken link to "Observations on trackpoint input data"
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-11-28 13:49:14 +01:00
Peter Hutterer
86698c8184 doc/user: add an example udev rule for LIBINPUT_IGNORE_DEVICE
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-11-16 06:47:48 +00:00
Peter Hutterer
3cb39abe9b doc/user: expand the udev rules for better readability
Split it over multiple lines and use fake cat command to show where that
rule could live.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-11-16 06:47:48 +00:00
José Expósito
be3c09bc15 doc/user: fix broken link to systemd 60-evdev.hwdb
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-10-30 12:10:10 +02:00
José Expósito
5bda716ebf fallback: hires scroll heuristics for buggy devices
Some devices might announce support for high-resolution scroll wheel
by enabling REL_WHEEL_HI_RES and/or REL_HWHEEL_HI_RES but never send
a high-resolution scroll event.

When the first low-resolution scroll event is received without any
previous high-resolution event, print a kernel bug warning and start
emulating high-resolution scroll events.

Fix #668

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-09-27 22:43:22 +00:00
José Expósito
1d6c38782f doc: add missing literal blocks in contributing
Add missing literal blocks in the section "Failed pipeline errors"
introduced in 140b4b7853.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-09-06 08:42:28 +02:00
Peter Hutterer
6bb02aaf30 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>
2021-08-31 08:45:01 +02:00
José Expósito
375618b81b 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>
2021-08-03 20:00:37 +02:00
José Expósito
140b4b7853 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>
2021-07-30 05:21:59 +00:00
Quytelda Kahja
e6c4b1d16e 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>
2021-07-28 23:53:36 +00:00
Peter Hutterer
ad239327c0 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>
2021-07-27 05:20:45 +00:00
Peter Hutterer
67405c2790 doc/user: fix the line alignments for the hold gesture tables
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-07-27 05:20:45 +00:00
Andrea Ippolito
967b9d3e45 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>
2021-07-26 12:35:33 +02:00
José Expósito
8aed8b6df6 doc: add touchpad gestures state machine diagram
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
2021-06-09 22:12:35 +00:00
Peter Hutterer
38e2a434c5 doc: add docs for hold gestures
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-06-09 13:12:59 +10:00
Peter Hutterer
c96d414fdc 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>
2021-06-09 13:01:26 +10:00
Peter Hutterer
d09cc9db00 doc/user: #wayland is now on oftc
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-05-25 20:19:36 +10:00
satrmb
0cb570addd evdev: restart debouncing timers after every event
Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
2021-05-19 12:24:59 +02:00
Nicolas Fella
20b2123fbc 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>
2021-05-04 21:16:55 +02:00
Peter Hutterer
354df8bce9 Change various references to the master branch to main
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-04-29 01:31:03 +00:00
Peter Hutterer
65c27713cf doc/user: fix a link to the system hwdb file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-04-29 10:30:49 +10:00
Peter Hutterer
2f8dab4537 doc/user: explain why we are doing motion normalization
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-03-16 21:29:56 +00:00
yuri1969
201b81ebe9 Fix worng quirk name in doc
The doc mentioned 'AttrTouchPressureRange' quirk but `src/quirks.c` defines
'AttrPressureRange' instead. This led to unknown quirk name errors.

Signed-off-by: yuri1969 <1969yuri1969@gmail.com>
2021-02-19 22:14:38 +01:00
Peter Hutterer
a0d842a640 doc: update the docs with a note regarding multifinger dragging
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-15 17:13:46 +10:00
satrmb
4ccdacaf95 touchpad: permit only one finger on the touchpad at the start of a tap-drag
This only affects the actual dragging part of the tap-and-drag interaction;
n-finger tap-and-drag is supposed to be performed with a n-finger tap
followed by a 1-finger drag.
Allowing a second finger in the middle of a drag is still necessary for a
finger swap, which users may need in long-distance drags, especially when
drag-lock is disabled.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
2021-02-15 05:46:46 +00:00
Peter Hutterer
03280de5e9 doc/user: generate the required package list for the CI distributions
Use yq to extract the package list from the CI configuration, then dump that
into the user docs. This provides the long-requested commands to install all
dependencies without the maintenance effort or risk of going stale.

Note that we are *not* building this in the CI, it's just not needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-15 15:22:42 +10:00
Peter Hutterer
081f914692 doc/user: expand the explanations on how to submit a merge request
I keep answering this in bug reports, much easier to just have a link to
copy/paste.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-03 17:09:09 +10:00
Peter Hutterer
4c4a0e1f0b doc/user: some whitespace fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-03 17:09:09 +10:00
Jonas Ådahl
c0364f2317 doc: fix IRC channel name
It said #wayland-devel, but it's #wayland.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-01-28 08:32:03 +01:00
Peter Hutterer
f2baea50c0 doc/user: list the known package repositories for libinput from git
Because dnf install is a lot easier than building from git where one just
wants to test the latest libinput.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-07 22:48:35 +00:00
Torstein Husebø
18c9265224 treewide: fix typos
Signed-off-by: Torstein Husebø <torstein@huseboe.net>
2020-12-16 22:08:23 +01:00
Peter Hutterer
8c5a850d39 doc: somewhat document the write_open for lid switches
Not a full documentation but slightly more information than before. This is
too niche to document it fully, we're only using it on one device anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-12-16 10:47:58 +10:00
Peter Hutterer
306b00a19d doc/user: document that we're only using internal devices for DWT
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-12-15 15:49:17 +10:00
Peter Hutterer
11d517f969 doc/user: update the timer offset warning for the new "too slow" message
Related #533

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-28 02:58:03 +00:00
Peter Hutterer
e882bd0216 quirks: add AttrInputPropEnable and Disable
The latter requires libevdev 1.10 but since that'll take a while to filter
into our various CI systems, let's make it conditional.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-23 13:35:50 +10:00
Peter Hutterer
e3c4ff3898 quirks: add AttrEventCodeEnable as counterpoint to the disable one
Currently unused, but let's get this in because we may need this very soon for
broken tablets.

Enabling EV_ABS axes requires an absinfo struct - we default to a simple 0-1
axis range for those as the most generic option. Anything more custom will
need more custom treatment when we need it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-23 13:35:50 +10:00
Peter Hutterer
788c7179a4 doc/api: fix the doxygen output handling
Using output: ['.'] broke ninja after ninja clean - it removed the whole
directory and thus the meson-generated configure_files (i.e. all the
doxygen sources we copied). ninja didn't know how to build those.

Fix this by rearranging the doxygen output to build into a different
directory now and setting the output to that. This doesn't exactly *fix*
things since that directory is no longer removed during ninja clean, but at
least the build no longer fails.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-29 17:48:31 +10:00