Commit Graph

360 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
8a743e7740 util-strings: drop unused safe_strdup()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
87dc6b6a3e util-strings: drop unused strv_join()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
110f454c1e util-strings: drop unused strv_from_argv()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
bd7f165019 util-strings: drop unused streq() and strneq()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
49ee2103a1 util-strings: drop unused kv_double_from_string()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
318a6119a8 util-strings: drop unused strstrip()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
6465d3cae8 util-strings: drop unused strendswith()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
94cfaa6b2d util-strings: drop unused strstartswith()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
d941ac25f1 util-strings: drop unused safe_basename()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
0ef9a59835 util-strings: drop unused trunkname()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Enrico Weigelt, metux IT consult
c77c82d92c util-strings: drop unused str_sanitize()
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:48:50 +01:00
Peter Hutterer
1d7b5c8196 meson.build: install the libinput-properties.h file
Patch provided by Brice De Bruyne

Closes #67

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/71>
xlibre-xf86-input-libinput-1.5.1.0
2025-08-18 10:50:43 +02:00
Oleh Nykyforchyn
a95e7b25e6 src: move _GNU_SOURCE definition before all includes in files that need vasprintf()
Build of input-libinput fails on GCC-11.2 although succeeds on GCC-14.2.
Function vasprintf() becomes implicitle declared because its definition
in stdio.h is guarded by __GLIBC_USE_LIB_EXT2 which depends on _USE_GNU,
which in turn depends on __GNU_SOURCE. __GNU_SOURCE is defined at
the beginning of util_string.h before #include <stdio.h>, and this file
is included by util_strings.c and xf86libinput.c. The latter file
includes first a lot of headers in /usr/include and /usr/include/xorg,
and finally util_string.h. If some of the previous header files
#include <stdio.h>, then it is included first without _GNU_SOURCE, and
vasprintf() is left undefined, which causes a build error.

This patch moves #define _GNU_SOURCE to util_strings.c and xf86libinput.c
from util_strings.h, thus making vasprintf() declaration safe and
independent of a specific compiler.

Signed-off-by: Oleh Nykyforchyn <olen.nyk@gmail.com>
2025-08-18 10:50:14 +02:00
b-aaz
f03931201b configure: Automatically detect the default xorg-module-dir.
The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
2025-07-29 18:51:09 +02:00
Enrico Weigelt, metux IT consult
13559018bd .github: add CI pipeline
This pipeline builds the driver against the latest Xserver stable
release as well as current master.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-29 17:24:43 +02:00
dec05eba
2e1f7a9b3a Improve xinput scrolling factor documentation
Use correct name for "libinput Scrolling Pixel Distance".

Signed-off-by: dec05eba <dec05eba@protonmail.com>
2025-07-09 19:33:48 +02:00
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