Commit Graph

341 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
47e72101ee .github: add NetBSD build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-29 11:07:07 +01:00
Enrico Weigelt, metux IT consult
c7571a80c5 .github: add freebsd and dragonfly build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-27 15:43:49 +01:00
Enrico Weigelt, metux IT consult
d013aa1717 .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:14 +01:00
Enrico Weigelt, metux IT consult
5b7b873dfa configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 16:00:03 +01:00
Enrico Weigelt, metux IT consult
c7e287c2a7 release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-input-mouse-25.0.0
2025-12-18 18:38:57 +01:00
Enrico Weigelt, metux IT consult
89d7cf603d configure.ac: drop obsolete XORG_WITH_LINT
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 17:52:31 +01:00
Enrico Weigelt, metux IT consult
34763e2943 drop xorg-mouse.pc
It's not a library that anything compiles against, so no need for
for pkgconfig descriptors.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 17:52:28 +01:00
Enrico Weigelt, metux IT consult
90489352dc configure.ac: replace DRIVER_NAME symbol by actual name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 12:59:03 +01:00
Enrico Weigelt, metux IT consult
4685741439 drop dead code
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 19:04:48 +01:00
Enrico Weigelt, metux IT consult
ff7bb75e5f drop obsolete #ifdef HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 19:03:52 +01:00
Enrico Weigelt, metux IT consult
0777036640 replace pointer by void *
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 17:30:02 +01:00
Enrico Weigelt, metux IT consult
8956e142b3 drop support for ancient ABIs < 23
No need to support ancient Xservers anymore

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 17:19:26 +01:00
Enrico Weigelt, metux IT consult
a97731e5b4 man: replace Xorg by XLibre
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:46:28 +01:00
Enrico Weigelt, metux IT consult
233a8e645d drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:45:29 +01:00
Enrico Weigelt, metux IT consult
f63f786365 README: fix Xorg vs Xlibre
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 11:04:39 +01:00
Enrico Weigelt, metux IT consult
5f530ddedb release 1.9.6
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-input-mouse-1.9.6
2025-12-15 12:27:53 +01:00
Enrico Weigelt, metux IT consult
dbbdaa407a configure.ac: fix package name and issue tracker URL
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 12:24:54 +01:00
Enrico Weigelt, metux IT consult
c4dfa6803a drop compat for ancient xserver versions
We're relying on at least 1.18 now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:58:27 +01:00
Enrico Weigelt, metux IT consult
a39b3fa7a8 define sign() macro on our own
It used to come from Xserver SDK headers, but going to removed from
there, so we have to define it on our own here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-input-mouse-1.9.5.4
2025-11-27 10:39:57 +01:00
b-aaz
7abd17cc69 Use the right location for USB headers on DFBSD.
On DragonFlyBSD the USB header files are stored in /usr/include/bus/u4b/
instead of /usr/include/dev/usb/; Added the checks and conditions to use
the bus/u4b headers on DragonFlyBSD instead.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
xlibre-xf86-input-mouse-1.9.5.3
2025-11-12 15:50:04 +01:00
Enrico Weigelt, metux IT consult
26494d47a3 .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>
xlibre-xf86-input-mouse-1.9.5.2
2025-07-29 17:33:25 +02:00
b-aaz
762d7650df 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 17:33:12 +02:00
callmetango
6d84baa9bc .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:01:41 +02:00
stefan11111
ba4c235867 bring back linux support
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-06-30 15:35:06 +02:00
Alan Coopersmith
a0aa387ba7 man page: Replace __xservername__ & __xconfigfile__ with Xorg & xorg.conf
These were originally to allow distros to build using XFree86 & XF86config
names, but we haven't supported that in nearly two decades now.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/24>
xlibre-xf86-input-mouse-1.9.5.1
2025-06-01 13:07:37 -07:00
Alan Coopersmith
196220ed3f man page: fix warnings from mandoc -T lint and groff -rCHECKSTYLE=10
mandoc: mousedrv.4:3:13: WARNING: cannot parse date, using it verbatim: TH xf86-input-mouse 1.9.5
an.tmac:mousedrv.4:51: style: blank line in input
an.tmac:mousedrv.4:187: style: .BR expects at least 2 arguments, got 1
an.tmac:mousedrv.4:190: style: .BR expects at least 2 arguments, got 1
an.tmac:mousedrv.4:215: style: .BI expects at least 2 arguments, got 1
an.tmac:mousedrv.4:217: style: .BI expects at least 2 arguments, got 1
an.tmac:mousedrv.4:258: style: .BR expects at least 2 arguments, got 1
an.tmac:mousedrv.4:344: style: blank line in input

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/24>
2025-06-01 10:25:18 -07:00
Alan Coopersmith
3a296dfeb9 mouse.c: remove useless cast for return from calloc
It wasn't even casting to the right type of pointer.

Clears warning from gcc 14.2.0:

mouse.c: In function ‘MousePreInit’:
mouse.c:971:19: warning: useless cast to type ‘void *’ [-Wuseless-cast]
  971 |     if (!(mPriv = (pointer) calloc(1, sizeof(mousePrivRec))))
      |                   ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
2025-05-24 14:43:20 -07:00
Alan Coopersmith
72ed70772c mouse.c: remove breaks after return statements [-Wunreachable-code-break]
Clears warnings from clang 19.1.7 of the form:

mouse.c:717:9: warning: 'break' will never be executed
 [-Wunreachable-code-break]
  717 |         break;
      |         ^~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
2025-05-24 14:43:20 -07:00
Alan Coopersmith
b6d147fb53 Make switch fallthrough markers compatible with clang and C23
Uses _X_FALLTHROUGH from xproto 7.0.34 if available,
local fallback if xproto is older than that.

Clears warnings from clang 19.1.7 of the form:

mouse.c:1219:17: warning: unannotated fall-through between switch labels
 [-Wimplicit-fallthrough]
 1219 |                 default:
      |                 ^
mouse.c:1219:17: note: insert '[[fallthrough]];' to silence this warning
 1219 |                 default:
      |                 ^
      |                 [[fallthrough]];
mouse.c:1219:17: note: insert 'break;' to avoid fall-through
 1219 |                 default:
      |                 ^
      |                 break;

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
2025-05-24 14:43:20 -07:00
Alan Coopersmith
2c481bb020 mouse.c: wrap multi-statement macros in do { ... } while (0)
Clears warnings from clang 19.1.7:

mouse.c:2877:31: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
 2877 |             do_ps2Reset(pInfo);
      |                               ^

mouse.c:3441:29: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
 3441 |             RESET_VALIDATION;
      |                             ^
[repeated for each call]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
2025-05-24 14:43:20 -07:00
Alan Coopersmith
903ef3f545 mouse.c: Remove stray semicolons after closing brackets
Clears warnings from clang 19.1.7:

mouse.c:364:14: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
  364 |             };
      |              ^
mouse.c:595:13: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
  595 |            };
      |             ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
2025-05-24 14:43:20 -07:00
Alan Coopersmith
f15c5702f8 mouse.c: handle -Wanalyzer-null-dereference in createProtoList
Should never happen, but the compiler would need to understand the flow
of our state machine to realize that, and this protects us if that ever
changes.

Clears warning from gcc 14.2.0:
mouse.c: In function ‘createProtoList’:
mouse.c:3226:30: warning: dereference of NULL ‘protoList’ [CWE-476]
 [-Wanalyzer-null-dereference]
 3226 |         for (i = 0; protoList[i] != PROT_UNKNOWN; i++) {
      |                     ~~~~~~~~~^~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
2025-05-24 14:43:20 -07:00
Alan Coopersmith
f3e246a7fb Improve man page formatting
More closely follow common style as described on
https://man7.org/linux/man-pages/man7/man-pages.7.html

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/22>
2025-04-22 17:49:30 -07:00
Alan Coopersmith
e2f9739bb5 man page: Remove USB & Xqueue from protocol list
I can't find any record of these being supported protocol names in the
git history since this was split out from the core X server.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/22>
2025-04-22 09:23:26 -07:00
Alan Coopersmith
0a52110f76 README: drop more unsupported OS'es
This driver hasn't had support for BSD/OS, Interactive Unix, LynxOS,
SCO, SVR4 (other than Solaris/illumos), nor PANIX since the conversion
to autoconf/automake for X11R7.0 in 2005.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/22>
2025-04-21 14:04:21 -07:00
Enrico Weigelt, metux IT consult
d719d0588c drop Linux support
Since the standard API on Linux is evdev (and we've got evdev and
libinput drivers for that), there's probably no need for using this
driver on Linux anymore. So, we can drop Linux support here.

Making the build fail on Linux, similar to xf86-input-keyboard.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/19>
2025-04-14 11:09:35 +02:00
Enrico Weigelt, metux IT consult
1121f601f7 lnx_mouse: don't hard-crash the whole Xserver on strdup() fail
No need to hard-crash the Xserver if simple strdup() fails, but handle
the situation gracefully instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/18>
2025-04-02 00:45:31 +00:00
Enrico Weigelt, metux IT consult
8f38817e8a Use strdup() instead of xstrdup()
No risk of passing NULL here, so using standard strdup() is safe.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/20>
2025-04-02 00:33:28 +00:00
Alan Coopersmith
91ea3050da gitlab CI: fix missing runner tag on FreeBSD jobs after gitlab migration
All jobs utilizing kvm (eg. FreeBSD) need the "kvm" runner tag set.
It used to work w/o it, since all runners did have kvm, but in the
new CI there are non-kvm runners, so we really need to set the tag.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/21>
2025-04-01 17:09:17 -07:00
Alan Coopersmith
9cc5531bf1 Move sizeof to second argument in calloc calls
Clears -Wcalloc-transposed-args warnings from gcc 14.1, such as:

mouse.c: In function ‘MousePreInit’:
mouse.c:900:32: warning: ‘calloc’ sizes specified with ‘sizeof’ in the
 earlier argument and not in the later argument [-Wcalloc-transposed-args]
  900 |     if (!(pMse = calloc(sizeof(MouseDevRec), 1)))
      |                                ^~~~~~~~~~~
mouse.c:900:32: note: earlier argument should specify number of elements,
 later size of each element

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/17>
2024-07-14 13:14:16 -07:00
Enrico Weigelt, metux IT consult
f538ef6461 gitlab CI: FTBS: fix pkg-config path
The pkg-config path isn't correct, so it finds an older version of xorgproto
that's already present in the base image, instead of the newer one we've
just built ourselves.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/15>
2024-05-30 10:27:40 +02:00
Enrico Weigelt, metux IT consult
538c0724f7 gitlab CI: FTBS: fix missing libepoll-shim
Recent Xserver needs libepoll-shim on FreeBSD.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/15>
2024-05-30 10:27:37 +02:00
Enrico Weigelt, metux IT consult
09b60284f0 use XNFrealloc() instead of xnfrealloc
xnfrealloc is just an alias for XNFrealloc() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/14>
2024-05-18 13:15:38 -07:00
Enrico Weigelt, metux IT consult
4ef48818c8 use XNFstrdup() instead of xnfstrdup
xnfstrdup is just an alias for XNFstrdup() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/14>
2024-05-18 13:15:38 -07:00
Enrico Weigelt, metux IT consult
832818c4a5 use XNFalloc() instead of xnfalloc
xnfalloc is just an alias for XNFalloc() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/14>
2024-05-18 13:15:38 -07:00
Alan Coopersmith
d2c6c6380e Raise required xserver version from 1.7 to 1.10 (ABI_XINPUT_VERSION 12.2)
Xserver 1.10.0 was released in Feb. 2011

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/11>
2024-05-12 23:55:10 +00:00
Alan Coopersmith
a2293e851a bsd_mouse: include sys/stat.h directly instead of relying on xf86_OSlib.h
xf86_OSlib.h used to include sys/stat.h but that was recently removed by
xorg/xserver@5057c716eb so we need to do
it here now.

Fixes compiler errors:
bsd_mouse.c: In function 'FindDevice':
bsd_mouse.c:282:17: error: storage size of 'devMouseStat' isn't known
  282 |     struct stat devMouseStat;
      |                 ^~~~~~~~~~~~
bsd_mouse.c:283:17: error: storage size of 'sb' isn't known
  283 |     struct stat sb;
      |                 ^~
bsd_mouse.c:298:21: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
  298 |                 if (fstat(fd, &devMouseStat) == 0)
      |                     ^~~~~
bsd_mouse.c:298:21: warning: nested extern declaration of 'fstat' [-Wnested-externs]
bsd_mouse.c:283:17: warning: unused variable 'sb' [-Wunused-variable]
  283 |     struct stat sb;
      |                 ^~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/12>
2024-05-12 16:42:51 -07:00
Alan Coopersmith
fbde5bf53c gitlab CI: install xorgproto from git before building the Xserver
Xserver git is now failing to build due to:
Dependency presentproto found: NO found 1.3 but need: '>= 1.4'

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/12>
2024-05-12 16:36:50 -07:00
Enrico Weigelt, metux IT consult
627e12a35c Fix missing #include <errno.h>
Two source files currently relying on xorg headers including errno.h for them.
Even though it practically works, it's not a very robust programming style
to rely on indirect includes. It's better when everybody includes what he need
on its own.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-03-19 11:51:58 +01:00
Alan Coopersmith
93396fdfb2 configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
so it's time to rely on it.

Clears autoconf warnings:

configure.ac:39: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
configure.ac:39: You should run autoupdate.
aclocal.m4:3465: AC_PROG_LIBTOOL is expanded from...
configure.ac:39: the top level

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-12-02 14:53:50 -08:00