10223 Commits

Author SHA1 Message Date
stefan11111
76356395e7 kdrive/fbdev: Fix uninitialized variable when switching vt's
When rapidly switching vt's, it can happen that shadow tries to
draw to the screen before it's initialized.
In that case, we return NULL, and we should also return a zero size,
because shadow doesn't check for NULL.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-23 12:47:36 +01:00
Enrico Weigelt, metux IT consult
43232e4f09 xfree86: edid.h: drop Uint typedef
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-22 13:03:12 +01:00
Enrico Weigelt, metux IT consult
4cc303a2d2 xfree86: xlibre-server.h: fix missing HAVE_TIMINGSAFE_MEMCMP
os.h still defining our own timingsafe_memcmp() prototype when this
symbol isn't set - this is causing trouble with drivers on FreeBSD.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-22 12:38:28 +01:00
Enrico Weigelt, metux IT consult
8ab6539d0b xfree86: replace Uchar by C standard uint8_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-22 11:14:23 +01:00
stefan11111
30fb629a7d kdrive: Enable zapping by default
Zapping is the fastest way to kill the X server, faster than vt switching,
or killing the window manager and configuring the X server to die with it.

It is very useful when debugging, or if the system runs very low on memory

This adds the `-nozap` argument, for restoring the old behavior.
The `-zap` argument is also kept for backwards compatibility.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-22 08:58:15 +01:00
stefan11111
162fda3bd6 kdrive/fbdev: Get glx working through glamor egl on Xfbdev
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-21 10:23:23 +01:00
stefan11111
f69d06e7d3 kdrive/fbdev: Fix miscmansuffix in the Xfbdev manpage
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-21 10:12:20 +01:00
stefan11111
c2ca290e63 kdrive: Build Xkdrive man page
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-21 10:12:20 +01:00
Enrico Weigelt, metux IT consult
f738e30963 xfree86: os-support: linux: drop unused lnx_ev56.c
This file isn't even compiled ever, so we really don't need it anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-14 15:55:35 +01:00
Enrico Weigelt, metux IT consult
36e1a9c37c xfree86: add exported xf86GetConsoleFd()
This functions is designed for some legacy keyboard drivers
(eg. xf86-input-keyboard) that need to get the fd to the console
device, so they don't need to directly access xf86Info field anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-14 11:15:19 +01:00
Enrico Weigelt, metux IT consult
efc9321a64 xfree86: os-support: drop local "fd" variable in xf86OpenConsole()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-13 17:50:38 +01:00
Enrico Weigelt, metux IT consult
d8eb141135 xfree86: os-support: common: reorganize console driver table
Merge driver name and open-proc tables into one, using a struct.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-13 17:05:58 +01:00
Enrico Weigelt, metux IT consult
e814acf006 xfree86: os-support: bsd: scope "vtmode" in xf86OpenConsole()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-13 15:30:33 +01:00
Enrico Weigelt, metux IT consult
fd5cd094d1 xfree86: os-support: bsd: scope "result" variable in xf86OpenConsole()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-13 14:52:40 +01:00
Imre Vadász
e0f4acc929 Remove workaround for ancient FreeBSD versions before 2.2.8.
This workaround was unnecessarily active for current DragonFlyBSD,
as well as probably for current FreeBSD as well, because the
"pcvt" console support would be used by default. Hence this adds
explicit code for the PCVT case to skip the quirk on FreeBSD and
DragonFlyBSD.

Signed-off-by: Imre Vadász <imre@vdsz.com>
2026-01-13 14:13:57 +01:00
Enrico Weigelt, metux IT consult
b5f2c96901 xfree86: os-support: bsd: tiny logging simplification on PCVT
There isn't much practical value of printing kernel PCVT driver
version into our log on NetBSD. Let's simplify this a bit and
get cut down the #ifdef wood a little bit.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-13 14:11:25 +01:00
stefan11111
69da481f66 kdrive/linux: Set device name when using the evdev driver
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-12 16:46:17 +01:00
stefan11111
cc152cf964 kdrive/linux: Improve evdev driver autodetection
It should now work out of the box on most setups
with one mouse and one keyboard.

It probably still breaks on some single mouse and keyboard
setups, and on setups with more than one mouse or keyboard.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-12 16:46:17 +01:00
stefan11111
a2c58b9934 kdrive/linux: Try all 32 static evdev device nodes
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-12 16:46:17 +01:00
stefan11111
cb445cef6b kdrive/fbdev: Use ShadowFB by default
It can be disabled by passing `-noshadow` to the command-line args

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-12 09:14:31 +01:00
stefan11111
984f403a17 kdrive: Fixup keyboard events after vt switch
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-12 08:08:52 +01:00
squishypinkelephant
6db9b685c1 fully split, rename kdInitInputPre to KdAddConfigInputDrivers 2026-01-08 10:32:42 +01:00
squishypinkelephant
80112b61ba split KdInitInput for Xephyr 2026-01-08 10:32:42 +01:00
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 25d99353eeb806f2929cf4423e481ff745ae4216.
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