10400 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
afc8ec2475 xfree86: add macros for declaring XF86ModuleData fields
XF86_MODULE_DATA_INPUT() creates XF86ModuleData field for input driver,
while XF86_MODULE_DATA_VIDEO creating one for a video driver.

These are filled with given values, _X_EXPORT'ed and properly named so
the module loader can find them. Also creating the associated
XF86ModuleVersionInfo field and link them into the XF86ModuleData.

Example:

    XF86_MODULE_DATA_INPUT(
        egalax,
        eGalaxPlug,
        eGalaxUnplug,
        "egalax",
        PACKAGE_VERSION_MAJOR,
        PACKAGE_VERSION_MINOR,
        PACKAGE_VERSION_PATCHLEVEL);

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-07 20:33:28 +01:00
Enrico Weigelt, metux IT consult
e561e3212b xfree86: xf86Module.h: macro for declaring video driver module version
Reduce the effort of declaring/filling an video driver's module version
struct to short statement like this:

    XF86_MODULE_VERSION_VIDEO("ati",
                              PACKAGE_VERSION_MAJOR,
                              PACKAGE_VERSION_MINOR,
                              PACKAGE_VERSION_PATCHLEVEL);

This will create a properly filled XF86ModuleVersionInfo structure
named `modInfo`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-07 20:09:39 +01:00
Enrico Weigelt, metux IT consult
a56a08e713 xfree86: xf86Module.h: macro for declaring input driver module version
Reduce the effort of declaring/filling an input driver's module version
struct to short statement like this:

    XF86_MODULE_VERSION_INPUT("egalax",
                              PACKAGE_VERSION_MAJOR,
                              PACKAGE_VERSION_MINOR,
                              PACKAGE_VERSION_PATCHLEVEL);

This will create a properly filled XF86ModuleVersionInfo structure
named `modInfo`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-07 19:51:48 +01:00
stefan11111
d92a55c286 kdrive/src: Implement special key handling
This is needed for Ctrl + Alt + F* vt switching
and Ctrl + Alt + Backspace server terminate.

We could implement other special keys too, it we want to.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-07 13:48:15 +01:00
stefan11111
01b91b7f60 kdrive/linux: Add special key handler proc
We're only interested in vt switching here.
Ctrl + Alt + Backspace server terminate will be handled by it's caller.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-07 13:48:15 +01:00
stefan11111
2f3d22ef1e kdrive/linux: Fix keyboard flushing
The old method will break with vt switching

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-07 13:48:15 +01:00
stefan11111
489ba91f4b kdrive/linux: Use OsSignal to set SIGUSR1 handler
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-07 13:48:15 +01:00
stefan11111
0d93b942ad kdrive/src: Remove all SIGIO code from kdrive
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-07 10:59:39 +01:00
stefan11111
fb16cef942 kdrive/src: Use threaded input in KdReleaseAllKeys
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-07 10:59:39 +01:00
stefan11111
77f15917d4 kdrive/linux: Fix typo in keyboard.c
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-07 10:59:39 +01:00
stefan11111
9afc6b1345 kdrive/src: revert c85ef2a6b5
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-07 10:59:39 +01:00
stefan11111
7a50b1dc3d kdrive/src: revert fd2483745b
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-07 10:59:39 +01:00
b-aaz
d2dcac6eca Revert "xkb: unexport XkbGetCoreMap() and XkbSetRepeatKeys()"
This reverts commit 25d99353ee.
These symbols are required by the xorgxrdp driver.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2026-01-07 10:56:33 +01:00
Enrico Weigelt, metux IT consult
1189bbdb40 xfree86: little documentation on XF86ModuleData
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 16:12:05 +01:00
Enrico Weigelt, metux IT consult
0b1e8a759c stop defining _XF86DRI_SERVER_
This once was needed on including xf86driproto.h, but these day
have gone now for aeons.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 14:42:01 +01:00
Enrico Weigelt, metux IT consult
6890d547f2 dri: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 14:16:31 +01:00
stefan11111
dc39eda42b treewide: Move the dri2 extension to Xext and use it for all X servers
This is needed to get proton working in Xfbdev, but is probably useful in other places too.

Xephyr has some unrelated issues regaring Xinput, so steam doesn't work there.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-02 17:51:43 +01:00
Oleh Nykyforchyn
3a367c5a47 xfree86/common: omit unnecessary search for matching devices
It is patch 3/3 of a series that makes adding GPU screens
more controllable.

If AutoAddGPU is "off", matching devices for autoconfigured
drivers are sought for anyway, and then the unused list is
freed. This patch cancels an unnecessary search.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2026-01-01 13:23:22 +01:00
Oleh Nykyforchyn
1dea31ce5c xfree86/man: add SingleDriver server flag to man page
It is patch 2/3 of a series that makes adding GPU screens
more controllable.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2026-01-01 13:23:22 +01:00
Oleh Nykyforchyn
c79f376594 xfree86/common: introduce SingleDriver server flag
It is patch 1/3 of a series that makes adding GPU screens
more controllable.

If SingleDriver option is set to "on", then only the first
successfully probed driver adds non-GPU screens, others
may add secondary GPU screens only.

Fixes github.com/X11Libre/xserver/issues/1669

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2026-01-01 13:23:22 +01:00
stefan11111
8cb69cd810 modesetting: clear bo in drmmode_create_front_bo
Fixes: https://github.com/X11Libre/xserver/issues/1740

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-01 13:23:22 +01:00
Aggelos Tselios
4bf912f92b hw: xfree86: seatd: remove unnecessary semicolons
Functions don't need to be terminated by semicolons, so this only
generates warnings.

Signed-off-by: Aggelos Tselios <aggelostselios777@gmail.com>
2026-01-01 13:23:22 +01:00
Enrico Weigelt, metux IT consult
095ea152b4 xfree86: dri2: use rpcbuf and sender macros
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-01 13:23:22 +01:00
polaris
7b72ce3a23 Only call xf86platformVTProbe() when defined
Signed-off-by: 9olaris <251053665+9olaris@users.noreply.github.com>
2026-01-01 13:23:22 +01:00
b-aaz
2c9d6b38d1 xwin: ddraw: Moved the include guard to its correct location.
The include guard in this file has been incorrectly moved up breaking
the #include_next behavior on MS Windows builds.
Moved it to its correct location.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-21 12:59:03 +01:00
b-aaz
7f7efe8195 Revert 9a82f5c, bring back Cygwin support.
Brought back the code removed in that commit so that we can bring back
Cygwin support.
Small changes are done in the process of resolving conflicts against the
current head.

Some checks have not been reverted, because they were not necessary
anymore.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-21 12:59:03 +01:00
b-aaz
a53697e70e xfree86: meson: Use install_symlink function instead of a hack.
This was a old hack used before Meson 0.61.0 added install_symlink, we
are at the meson release 1.10.0 so it is safe to use the new proper
function for this task.

Also used the X server's executable name as the link target name, and as
the SUID wrapper's name.

Moved the minimum Meson version up to 0.61.0.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-21 11:39:23 +01:00
Enrico Weigelt, metux IT consult
49c15555f9 meson.build: install xlibre-server.h in addition to xorg-config.h
Both files are equal, but drivers should gradually migrate to the
new one, while the old one is phased out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 12:54:57 +01:00
Oleh Nykyforchyn
ec49f5d24a xfree86/common: hide a variable behind XSERVER_LIBPCIACESS
A variable pci_other is declared and can be used only on libpciacceess builds.

Fixes: https://github.com/X11Libre/xserver/issues/1713
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-18 11:02:10 +01:00
Enrico Weigelt, metux IT consult
aefde94a2d meson: drop obsolete vendor information options
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 13:52:37 +01:00
b-aaz
b71e2a9a23 arm_video.c: Fixed xf86_os_support.h's #include.
The 'h' in the file suffixed was mistakenly removed, fixed it.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-12-15 19:43:54 +01:00
Enrico Weigelt, metux IT consult
c95748921a xfree86: drop obsolete xf86SetTVOut() and xf86SetRGBOut()
These are only defined on NetBSD and not used anywhere, and not
functional at all (just killing the Xserver). No need to carry
them around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-14 11:24:39 +01:00
Enrico Weigelt, metux IT consult
16d4d44551 os: drop symbol TCPCONN
It's been always enabled for aeons, so no practical need to
disable it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-13 15:59:07 +01:00
Oleh Nykyforchyn
ee73f84c65 xfree86/common: make screenConfig take autoAddGPU into account
This patch puts configServerFlags() before configScreen()'s and
makes the latter to use xf86Info.autoAddGPU value.

Fixes: https://github.com/X11Libre/xserver/issues/1658
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-13 15:27:06 +01:00
Enrico Weigelt, metux IT consult
43c5b45f4a mingw32: fix winsock2.h include
winsock2.h needs to be included before windows.h

> /usr/share/mingw-w64/include/winsock2.h:15:2: error: #warning Please include winsock2.h before windows.h [-Werror=cpp]
>    15 | #warning Please include winsock2.h before windows.h
>       |  ^~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-12 19:41:55 +01:00
Enrico Weigelt, metux IT consult
3c2bf225ca xnest: silence type mismatch warning on ming32
KeySym and xcb_keysym_t should both be 32bit, but for the compiler
they're long vs int, so it's spitting out a warning here. That's
coming from xorgproto's weird way of defining those types.

Add static type size assert and hard typecast to silence it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-12 19:41:55 +01:00
Enrico Weigelt, metux IT consult
05893d65c9 xquartz: declare variables when needed
Declare some more variables when actually needed / assigned first time.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:38:44 +01:00
Enrico Weigelt, metux IT consult
01768051cf xwin: drop wrapping on ScreenRec->CloseScreen()
Instead of complicated wrapping, just call fbCloseScreen() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:33:13 +01:00
Enrico Weigelt, metux IT consult
a0c67bd720 xquartz: drop obsolete _mesa_free() and _mesa_malloc()
These macros are always defined to free() and malloc(), so we don't
really need them, instead can use those functions directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:30:47 +01:00
Enrico Weigelt, metux IT consult
0a18956047 kdrive: ephyr: add noreturn attribute to ephyrProcessErrorEvent()
>  ../hw/kdrive/ephyr/ephyr.c:977:1: warning: function 'ephyrProcessErrorEvent' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
>    977 | {
>        | ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 14:34:16 +01:00
Enrico Weigelt, metux IT consult
f590b320cc xfree86: silence warnings on SYSCALL() macro
> ../hw/xfree86/os-support/shared/posix_tty.c:366:38: warning: while loop has empty body [-Wempty-body]
>    366 |     SYSCALL(r = read(fd, buf, count));
>        |                                      ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 14:33:53 +01:00
Enrico Weigelt, metux IT consult
f4b90697ce xfree86: fix include of xf86VGAarbiter_priv.h
Needs to be included also in non-pciaccess case, so the dummy
functions are declared.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 15:24:08 +01:00
Enrico Weigelt, metux IT consult
01777ec8dd xfree86: fix xf86VGAarbiterWrapFunctions() definition in non-libpciaccess case
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 15:24:08 +01:00
Oleh Nykyforchyn
ae689438dc xfree86/modesetting: prevent modesetting driver from
grabbing claimed slots

This patch makes modesetting driver use the return value of the extended
xf86ClaimFbSlot to prevent crashes.

Fixes: https://github.com/X11Libre/xserver/issues/1505
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-10 15:00:31 +01:00
Oleh Nykyforchyn
9307a252c9 xfree86/common: introduce generic xf86CheckSlot() function
This function will be used by xf86Claim{Fb,Pci,Platform}Slot()
to prevent them from claiming already used slots.

Fixes: https://github.com/X11Libre/xserver/issues/1505
Fixes: d3fd8c385b
Fixes: d09b3dae3e
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-10 15:00:31 +01:00
Enrico Weigelt, metux IT consult
90c8af27bd include: move writing xorg-config.h to the end
This allows us to move around probing DDX specific logic out of the fat
include/meson.build to more appropriate places, eg. xfree86/meson.build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 14:54:28 +01:00
Enrico Weigelt, metux IT consult
9ddce7292d xfree86: doc: drop mentioning xf86MapPciMem()
This function has been removed decades ago.

Fixes: 46f55f5dea
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 12:47:30 +01:00
Enrico Weigelt, metux IT consult
6e560bf9c6 xfree86: doc: drop mentioning xf86GetPciVideoInfo()
This function had been removed back two decades ago, so it's time to update
documentation now.

Fixes: 46f55f5dea
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 12:47:23 +01:00
Enrico Weigelt, metux IT consult
84bfff6672 kdrive: fix missing include to ddx_priv.h
Fix missing prototype for OsVendorInit()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 19:51:11 +01:00
stefan11111
58143b96fd modesetting: don't leak memory for the cursor plane if libdrm is too old
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-12-08 14:23:09 +01:00