Commit Graph

372 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
8e29361dfd .github: update action version
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-30 17:13:02 +01:00
Enrico Weigelt, metux IT consult
e8f07a1a95 .github: add freebsd and dragonfly build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-27 14:07:15 +01:00
Enrico Weigelt, metux IT consult
2dba841ff6 .github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo,
instead of having lots of duplicated pipeline and script in all the
individual driver repos.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-23 10:13:10 +01:00
Enrico Weigelt, metux IT consult
4cbd329407 configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:59:40 +01:00
Enrico Weigelt, metux IT consult
80daaadd99 release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-input-libinput-25.0.0
2025-12-18 18:39:48 +01:00
Enrico Weigelt, metux IT consult
c3aaef48de drop obsolete .editorconfig
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 17:50:52 +01:00
Enrico Weigelt, metux IT consult
5a94e12c38 configure.ac: replace DRIVER_NAME symbol by actual name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 12:31:55 +01:00
Enrico Weigelt, metux IT consult
aa23b2079f drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:49:28 +01:00
Enrico Weigelt, metux IT consult
6b692e3e1b drop obsolete HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 19:02:35 +01:00
Enrico Weigelt, metux IT consult
87f63feb24 drop xorg-libinput.pc
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 18:46:55 +01:00
Enrico Weigelt, metux IT consult
dcfbe775cd release 1.5.2
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-input-libinput-1.5.2
2025-12-16 14:44:01 +01:00
Enrico Weigelt, metux IT consult
f86600edd0 man: replace Xorg by XLibre
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:45:09 +01:00
Enrico Weigelt, metux IT consult
771cada821 README.md: fix URLs
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 11:08:13 +01:00
GermanAizek
d07bc60926 libinput: option tapping by default enabled
This fix helps most laptop users not to change properties in config.

Issue: https://github.com/X11Libre/xf86-input-libinput/issues/6
Signed-off-by: Herman Semenov <GermanAizek@yandex.ru>
2025-12-15 17:16:01 +01:00
Oleh Nykyforchyn
4f163b3f73 xf86-input-libinput: make Emulate3Buttons a synonym for MiddleEmulation
This patch in intended to ease transition form evdev to libinput as
the primary driver for mice.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-15 17:15:16 +01:00
Enrico Weigelt, metux IT consult
112263280f fix warning on unhandled values
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:2617:9: warning: enumeration value 'LIBINPUT_EVENT_TABLET_PAD_KEY' not handled in switch [-Wswitch]
>  2617 |         switch (type) {
>       |         ^~~~~~
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:2617:9: warning: enumeration value 'LIBINPUT_EVENT_GESTURE_HOLD_BEGIN' not handled in switch [-Wswitch]
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:2617:9: warning: enumeration value 'LIBINPUT_EVENT_GESTURE_HOLD_END' not handled in switch [-Wswitch]

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 17:15:03 +01:00
Enrico Weigelt, metux IT consult
5d27c689bf fix struct name clash with Xserver SDK
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c: In function 'xf86libinput_set_pressure_range':
> /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:465:53: warning: declaration of 'range' shadows a global declaration [-Wshadow]
>   465 |                                 const struct range *range)
>       |                                 ~~~~~~~~~~~~~~~~~~~~^~~~~
> In file included from /usr/include/xorg/xf86.h:44,
>                  from /builds/metux/xf86-input-libinput/_builddir/../src/xf86libinput.c:36:
> /usr/include/xorg/xf86str.h:110:3: note: shadowed declaration is here
>   110 | } range;
>       |   ^~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 17:14:55 +01:00
Enrico Weigelt, metux IT consult
8c2a8fa56c disable pointless warnings
Add -Wno-declaration-after-statement for suppressing pointless warnings
on declarations after statement.

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

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 17:14:27 +01:00
Peter Hutterer
0f6cc09321 Add support for the libinput plugin system
This is hardcoded to be enabled from the default paths (/usr/share and
/etc) without any extra paths. If there is a need we can add xorg.conf
options later but for now it will do.

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/73>
2025-12-15 14:05:20 +01:00
Peter Hutterer
733692c9ce meson.build: add dep_libinput as dependency for the KANA check
So meson can find the libinput.h header if libinput is in a nonstandard
path.

Fixes: 0bcb60e744 ("Add support for LIBINPUT_LED_COMPOSE/LIBINPUT_LED_KANA")
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/72>
2025-12-15 13:54:48 +01:00
Enrico Weigelt, metux IT consult
e0c4e1afc4 configure.ac: fix package name and issue tracker URL
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 13:39:29 +01:00
Enrico Weigelt, metux IT consult
577d0600c4 util-strings: don't crash the Xserver on memory alloc failure
It's only consumer already properly checking for NULL return value,
so can directly use calloc() here, instead of zalloc() which is
crashing the Xserver.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 13:55:56 +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