1330 Commits

Author SHA1 Message Date
stefan11111
a2976e3023 treewide: Pull DEFAULT_LOGDIR into dix-config.h
With this, X servers don't have to parse this option separately,
and can just use it after including dix-config.h

Linux kdrive servers (currently Xfbdev only) now support logging.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-03-18 14:09:52 +01:00
Diego Viola
639551d032 treewide: fix typos
Signed-off-by: default avatarDiego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2138>

---------------------------------------------------------------------------

One of the spelling errors was moved to another file and fixed there

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-03-16 13:11:07 +01:00
stefan11111
e6a0fa4b0c Treewide: Fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2134>

----------------------------------------------------------------------------

This commit is the result of `git apply commit.diff --reject`
applied on e8f4522312

67c82078fe does not
apply to Xlibre

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-03-16 13:11:07 +01:00
Alan Coopersmith
e4d55c4453 ephyr: show that -name & -title take non-optional arguments in usage output
Fixes: f028e245a7 ("Bug #10016: Implement WM_CLASS hints in Xephyr.")
Fixes: e3c65cf1df ("xephyr: Add -title option.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2137>
2026-03-16 13:06:53 +01:00
Alan Coopersmith
6e3afd4be4 ephyr: add -name to Xephyr man page
Fixes: f028e245a7 ("Bug #10016: Implement WM_CLASS hints in Xephyr.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2137>
2026-03-16 13:06:53 +01:00
Alan Coopersmith
bee767c000 ephyr: add -title to Xephyr man page
Fixes: e3c65cf1df ("xephyr: Add -title option.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2137>
2026-03-16 13:06:53 +01:00
Alan Coopersmith
465742c7b4 os: add a generic -verbose option instead of making each server add its own
Replaces Xwayland's server-specific implementation, but leaves Xorg's
since it sets global variables in the xfree86 ddx layer.  Also leaves
Xephyr's differently-spelled "-verbosity" for backwards compatibility.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2131>
2026-03-16 13:06:32 +01:00
Enrico Weigelt, metux IT consult
126eb37529 kdrive: linux: replace __uid_t and __gid_t by standard types
Fix build on musl.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-16 14:51:39 +01:00
Enrico Weigelt, metux IT consult
b2e858ee80 meson.build: move build_xephyr and build_xfbdev to toplevel
These values are also used in at the toplevel, and we're going to
have more uses there for xorg-sdk-only builds.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 12:34:15 +01:00
Enrico Weigelt, metux IT consult
69d57bcf52 Xext: move over public SDK headers to include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-12 19:00:42 +01:00
Enrico Weigelt, metux IT consult
5478f077d9 kdrive: meson.build: little indention fix
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-12 14:25:18 +01:00
Enrico Weigelt, metux IT consult
62b0add858 mi: move ValidateRec to mi_priv.h and rename to MiValidateRec
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 18:27:41 +01:00
Enrico Weigelt, metux IT consult
56b683cd4e kdrive: replace DDXPoint by xPoint
DDXPoint is just an alias to xPoint

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 16:00:33 +01:00
stefan11111
4060cd7d59 kdrive/fbdev: Use ARRAY_SIZE from dix.h
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
34d16e48d4 kdrive/fbdev: Use bool instead of Bool
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
c4037d0518 kdrive/fbdev: Call fbdev_glamor_egl_chose_configs from fbdev_glamor_egl_create_context
We only need the config attribute list from the caller,
we can chose the configs and free them ourselves

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
4a9da08a99 kdrive/fbdev: simplify fbdev_glamor_egl_chose_configs
Now that we're first trying no-config contexts,
there is no need to inject an `EGL_NO_CONFIG_KHR`
as the first config in the returned list

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
446485991d kdrive/fbdev: Try creating a no-config egl context first, and skip config chosing
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
29f75ea334 kdrive/fbdev: Get glamor working with the nvidia 390 driver
Only the render acceleation and xv work for some reason.
glx only wants to create indirect contexts, which don't work.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
d65cabb1d3 kdrive/fbdev: Get glamor working with the nvidia 470 driver
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
5adae6c3b3 kdrive/fbdev: Don't try to accelerate rendering with glamor with a sw driver
It will likely be slower that unaccelerated rendering.
Command-line flags were added for overriding this.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
f3c5b41161 kdrive/fbdev: Set glvnd vendor automatically
This makes glamor hw accel work out of the box

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
49800f024d kdrive/fbdev/fb_glamor.c: Check for egl extensions properly
See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14715

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
1f89bcfbdc kdrive/fbdev: Prefer exact GL vendor match when choosing EGLDevices
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
125b7c5bef kdrive/fbdev/fb_glamor.c: Prefix glamor helpers with fbdev_
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
657eb49b85 kdrive/fbdev: Enable X-Video support if available
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
2a898cbaf1 kdrive: Pull ephyr/ephyr_glamor_xv.c into src/ and make generic
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
c4b070319b kdrive/fbdev: Set glvnd vendor with glamor_set_glvnd_vendor
This makes it so that glamor glx can properly initialize and
choose hw accelerated `FBConfig`s, instead of just using softpipe/llvmpipe.

This commit fixes the issue described in https://github.com/X11Libre/xserver/pull/1832#issue-3827524680

Now, `FBConfig`s corresponding to the choosen accelerated `EGLDevice`
are choosen by `glXChooseFBConfig`.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
069fc8f6bb kdrive/fbdev: Uncouple glamor from glx
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
04a30c2719 kdrive/fbdev: Allow forcing glamor to create GL/GLES contexts only
This brings Xfbdev's glamor code in line with glamor/glamor_egl.c

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
Enrico Weigelt, metux IT consult
4642d6207f os: unexport SeatId and move it to dix settings
Not used by any external module/driver, so no need to keep it
public. Also move it to the new dix settings code and rename it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-03 11:34:14 +01:00
Enrico Weigelt, metux IT consult
569f6f936f kdrive: mode KD_* defines into kinput.c
Only locally used there, so no need to keep them in global header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-03 10:44:52 +01:00
stefan11111
3913c997a9 kdrive/ephyr: Fix typo when checking for EGL_KHR_platform_x11
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-31 16:16:31 +01:00
stefan11111
5c4ac767bb kdrive: Try the evdev input driver if nothing the regular drivers aren't compiled
Now that this driver works on most systems (hopefully) without any configuration,
it makes sense to use it as a fallback default.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-28 15:05:54 +01:00
stefan11111
b4c45980ff kdrive: Fix other kinds of vt switches
When starting an X server from a terminal running
inside another X server, the "host" X server sees
the key press event, but not the key release event,
and misinterprets this as a long keypress.

With this patch, we forge the missing key release event,
so the server doesn't think that the user is holding a key down.

This is different from Ctrl + Alt + F* vt switching, because
there we don't want the X server to see the key press event at all,
and we want to forge key release events for the Ctrl + Alt keys.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-01-27 19:15:44 +01:00
Enrico Weigelt, metux IT consult
bf7b650482 kdrive: make KdAllocatePrivates() static
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-27 19:11:03 +01:00
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
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
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
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