Commit Graph

344 Commits

Author SHA1 Message Date
dec05eba
9e3544b258 Add ScrollFactor option to change mouse/touchpad scroll speed
Add xorg option ScrollFactor.
Add xinput option "libinput Scrolling Factor".

This works well in xi2 applications where they receive the raw scroll
value, however applications that use the core x11 protocol only for input
receive a scroll button press. The frequency this scroll button press
event is sent depends on the value of ScrollFactor, so it works in such
applications as well but the scrolling wont be as "smooth" as if they
used xi2.

gtk, qt, chromium (and electron) applications seem to use xi2 while
firefox does not, unless you set the MOZ_USE_XINPUT2=1 environment
variable.

Signed-off-by: dec05eba <dec05eba@protonmail.com>
2025-07-09 16:48:28 +02:00
callmetango
cda5a982af .github: Add issue forms
Add the following forms for issue creation:

* Bug report
* Feature request
* Code change
* Documentation update
* Organizational task

* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate

Part-of: X11Libre/misc#156
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-07 17:02:05 +02:00
Enrico Weigelt, metux IT consult
83adc38e59 fix name clash on range parameter
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 19:03:33 +02:00
Enrico Weigelt, metux IT consult
1330f1ded1 util-strings: drop unused xasprintf()
Unsed code and just making trouble on correctly including stdio.h, because
it's using a GNU extension function -- vasprintf().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 16:45:48 +02:00
Enrico Weigelt, metux IT consult
8366e3a41e util-strings: drop unused xvasprintf()
Unsed code and just making trouble on correctly including stdio.h, because
it's using a GNU extension function -- vasprintf().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 16:40:16 +02:00
Alan Coopersmith
9c64c0236c Improve man page formatting
More closely follow common style as described on
https://man7.org/linux/man-pages/man7/man-pages.7.html
and fix warnings raised by `mandoc -T lint` and `groff -rCHECKSTYLE=10`

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/70>
xlibre-xf86-input-libinput-1.5.0.1
2025-06-01 09:32:20 -07:00
Enrico Weigelt, metux IT consult
c674db53d9 fix unused variable click_methods
This variable is only used under certain (build-time) conditions,
so need needs to be defined/assigned under those.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/65>
2025-04-16 23:16:53 +00:00
Enrico Weigelt, metux IT consult
8a63e97e0c ci: fix missing diffutils
> checking if gcc supports -fno-rtti -fno-exceptions... /builds/metux/xf86-input-libinput/_builddir/../configure: line 8891: diff: command not found

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/67>
2025-04-16 15:41:43 +02:00
Peter Hutterer
c712930ef4 xf86-input-libinput 1.5.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-libinput-1.5.0
2024-10-15 14:06:00 +10:00
Peter Hutterer
db7cfbe5c2 test: fix some scan-build warnings
e.g.
../../../test/test-draglock.c:262:2: warning: Value stored to 'rc' is never read [deadcode.DeadStores]
  262 |         rc = draglock_init_from_string(&dl, "10");
2024-10-15 13:58:18 +10:00
Peter Hutterer
cb80d7f82d Map some specific high keycodes into the FK20-23 range
These mappings have been part of xkeyboard-config for over a decade and
the likely reason they were introduced is that the corresponding evdev
keycode is > 255.

Let's forcibly remap those in the driver here so the rest of the system
can switch to the real keycodes instead of having to map them to the
whatever X expects.

See https://github.com/systemd/systemd/pull/34325/

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/62>
2024-10-09 23:25:17 +00:00
Peter Hutterer
7c5635cd6f Silence a compiler warning
../src/xf86libinput.c: In function ‘prop_draglock_set_pairs’:
../src/xf86libinput.c:5153:30: warning: comparison is always false due to limited range of data type [-Wtype-limits]
 5153 |                 if (pairs[i] > MAX_BUTTONS)

MAX_BUTTONS is defined by the server so let's use a temporary local
variable to silence the compiler.

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/61>
2024-10-09 14:02:44 +10:00
Peter Hutterer
b396ba3697 Prevent theoretical null-pointer dereference
Cannot happen since we don't enter this function if the atom isn't one
of the three checked above but the static analyzer doesn't know that.

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/60>
2024-09-13 03:06:20 +00:00
Martin Rys
0bcb60e744 Add support for LIBINPUT_LED_COMPOSE/LIBINPUT_LED_KANA
Added in libinput 1.26

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/58>
2024-09-12 09:31:01 +10:00
Peter Hutterer
3a33984cce Fix a bunch of whitespace issues
xf86libinput_kbd_ctrl() in particular was a copy/paste with 4-space
indentation, the rest is mostly space->tab replacement.

As pointed out in !58

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/59>
2024-09-06 10:14:31 +10:00
Peter Hutterer
bb41cc730c Add support for clickfinger button maps 2024-07-19 11:44:49 +10:00
Peter Hutterer
72c8eb25f8 Implement tablet tool pressure range support 2024-06-10 09:27:57 +00:00
Peter Hutterer
74335c6fd6 Revert "fix int type mismatches in printf()-like calls"
This now warns on 64-bit machines:
../src/xf86libinput.c:542:61: warning: format ‘%lu’ expects argument
of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ {aka ‘unsigned int’} [-Wformat=]

Given they vastly outnumber 32-bit machines now, let's go back to the
old one that only warns on 32 bit until we fix the actual source types
to use uint32_t and similar.

This reverts commit a7d2994256.
2024-06-07 11:14:17 +10:00
Enrico Weigelt, metux IT consult
b791b30b1f update .gitignore
"test/test-bezier" was yet missing

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-21 13:21:09 +01:00
Enrico Weigelt, metux IT consult
a7d2994256 fix int type mismatches in printf()-like calls
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-21 13:21:09 +01:00
Enrico Weigelt, metux IT consult
c6b4d2732f replace BUG_() macros by xf86IDrvMsg() calls
Latest master moved the BUG_() macros out of os.h, and it's more appropriate
to use xf86IDrvMsg() in those cases (like we're already doing in other places)
anyways.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-21 13:19:47 +01:00
Peter Hutterer
6ed6814489 gitlab CI: update to latest templates and current fedora 2024-02-20 08:24:15 +10:00
Peter Hutterer
a24f467576 Add editorconfig file 2024-02-20 08:22:16 +10:00
Peter Hutterer
b254d491e2 Add a property for the tablet tool serial and hw ID
The driver encodes the serial in the device name but that's not reliable
enough. Expose both serial and tool id (optional) as a property so
clients can read them and adjust their behavior accordingly.

Fixes #16
2023-11-10 08:17:46 +10:00
Peter Hutterer
0dc42f0e4e Sort the read-only properties 2023-11-10 08:16:59 +10:00
Peter Hutterer
46af622e9d xf86-input-libinput 1.4.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-libinput-1.4.0
2023-08-25 13:51:18 +10:00
Peter Hutterer
5e20d16dd4 Don't try to enable a NULL device
If there is no other libinput device in our list (and next is thus NULL),
skip the xf86AddEnabledDevice() call.

Fixes #60
2023-07-10 09:05:19 +10:00
Peter Hutterer
310db4206f Don't run past the last element in the list
If there is no (other) libinput device in the current device list, we'd
eventually end up with next == NULL, causing a segfault.

Fixes #60
2023-07-03 13:33:19 +10:00
Peter Hutterer
94a52a8488 tablet: map BTN_STYLUS3 to button 8
Buttons 4-7 are out of bounds for hysterical historical reasons.
Previously this button fell through to the default statement and
resulted in 8 + BTN_STYLUS3 - BTN_SIDE == 65 which is rather obviously
wrong.

Instead, map it explicitly to what the fourth button would be mapped to
on other devices. This will now overlap with BTN_SIDE on devices that
both BTN_STYLUS3 *and* BTN_SIDE but those devices don't appear to exist
in the real world.

Fixes #50

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-15 15:09:31 +10:00
Peter Hutterer
a4dfadee2f Initialize the left-handed property for tablet tools
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-06-08 14:14:37 +10:00
Peter Hutterer
141aa867a6 Change the capabilities to an enum
Slightly nicer for debugging.
2023-06-08 14:14:37 +10:00
Yinon Burgansky
57b049d376 Improve documentation of the custom acceleration profile 2023-04-26 01:33:46 +03:00
Peter Hutterer
8cf533df3a xf86-input-libinput 1.3.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-libinput-1.3.0
2023-04-04 14:56:40 +10:00
Yinon Burgansky
484b6a7f3f Add support for the scroll movement type of the custom acceleration profile
Adds new properties and xorg.conf entries for setting the scroll acceleration
function's points and step.
The new xorg.conf entries are AccelPointsScroll, AccelStepScroll.
2023-02-18 21:22:15 +02:00
Shin-myoung-serp
e87c7bfcc2 Correct the coordinate transform parameters for an absolute pointer
Fixes #53
2023-02-01 18:33:31 +09:00
Peter Hutterer
f94a8edb0e Add support for custom pointer acceleration
Adds new properties and xorg.conf entries for setting the acceleration
function's points and step.

`AccelProfile` option can now accept `custom` value.

Add 4 new options which only apply when `AccelProfile` is `custom`:

- Add `AccelPointsFallback` option for setting the points of the
  Fallback acceleration function. Points values are represented by a
  space-separated list, e.g. "0.0 1.0 2.4 2.5".

- Add `AccelStepFallback` option for setting the step of the Fallback
  acceleration function. When a step of 0.0 is provided,
  libinput default Fallback acceleration function is used.

- Add `AccelPointsMotion` and `AccelStepMotion` options, which are
  equivalent to `AccelPointsFallback` and `AccelStepFallback` options,
  but apply to the Motion acceleration function.

See libinput documentation for a detailed explanation of custom
pointer acceleration.
2023-01-09 15:53:38 +02:00
Peter Hutterer
ca02afd8d2 configure.ac: inputproto 2.4 is optional
Missing else condition in PKG_CHECK_MODULES caused configure to bail out
where 2.4 wasn't available.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-12-09 09:15:09 +10:00
Alan Coopersmith
252bc4ba0d gitlab CI: enable gitlab's builtin static analysis
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-23 16:58:19 -07:00
Alan Coopersmith
925903018f gitlab CI: enable commit & merge request checks
Uses ci-fairy from freedesktop/ci-templates

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-23 16:58:19 -07:00
Hong Xu
dfc5e20426 Better explain HorizontalScrolling. 2022-04-27 11:33:46 +00:00
Peter Hutterer
2ee183a6cd Add meson build system
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-01-25 12:21:09 +10:00
Peter Hutterer
efa999e377 man: use @VERSION@ for the driver version
Makes use of meson easier which requires @ as pre/suffix for variables.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-01-25 12:16:04 +10:00
Peter Hutterer
7b4a870b23 man: replace the various suffixes with their actual numbers
These don't change, iirc they exist because of some unixes having
different man pages but at this point really on Solaris is left and that
uses the same suffixes as everyone else.

And the __xservername__ is a leftover from the Xfree86 vs Xorg days - if
you're still running Xfree86, you're not using this driver.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-01-25 12:16:04 +10:00
Peter Hutterer
30500626fe Drop HAVE_CONFIG_H, we always have it defined
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-01-25 09:56:13 +10:00
Peter Hutterer
62f267a952 xf86-input-libinput 1.2.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-libinput-1.2.1
2022-01-24 15:00:09 +10:00
Peter Hutterer
c1f07edafa Fix a compiler warning
xf86libinput.c:2457:89: warning: passing argument 1 of
‘libinput_event_pointer_get_axis_source’ from incompatible
pointer type [-Wincompatible-pointer-types]

No function changes due to the binary layout of libinput events but
let's not rely on that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-01-24 11:38:53 +10:00
Alan Coopersmith
a3d38b0f40 Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-16 21:32:35 +00:00
Alan Coopersmith
e3a75f34f8 Fix spelling/wording issues
Found by using:
    codespell --builtin clear,rare,usage,informal,code,names

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-16 11:50:26 -08:00
Luna Nova
830f7c3b1b Fix copy-paste error in LibinputInitAccelProperty checking available profiles against adaptive/flat 2021-12-18 04:55:14 +00:00
Peter Hutterer
4ab7873366 Quietly check for the _source option
xf86CheckStrOption returns the same value but doesn't mark it as used in
the server and, more importantly, doesn't spam the log with
  (**) Option "_source" "server/udev"
messages.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-11-24 01:14:05 +00:00