Commit Graph

21023 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
e1b1c2f514 os: ospoll: use realloc() instead of reallocarray()
MacOS doesn't support reallocarray(), and we can't include os.h here
on win32/mingw.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 14:49:23 +02:00
callmetango
23f26bd95e README: mention June 2025 X.Org CVE fixes
Mention the integration of the June 2025 X.org CVE fixes into the XLibre
Xserver. Add a link to our Q&A discussions as well.

Fixes: #522
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-31 10:39:04 +02:00
stefan11111
9cadd707e9 xfree86: loader: Ignore abi mismatch for the proprietary nvidia DDX
This is a proprietary DDX driver made by nvidia.
We can't rebuild it against Xlibre, so the abi check would always fail.

See: https://github.com/X11Libre/xserver/pull/262
See: https://github.com/X11Libre/xserver/issues/447
See: https://forums.gentoo.org/viewtopic-t-1174826.html

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-31 10:28:08 +02:00
Enrico Weigelt, metux IT consult
8299ef3d81 os: xtrans: fix shadowed variable
`arg` is also a parameter of that functions, so we really shouldn't
also have a local variable by the same name.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 20:40:51 +02:00
Enrico Weigelt, metux IT consult
f1c1293803 xwin: win.h: missing include of dix/dix_priv.h
Needed for dixAddAtom()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 20:40:38 +02:00
Enrico Weigelt, metux IT consult
0888156f31 xwin: fix missing prototype of parse_file()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 20:40:21 +02:00
callmetango
5e13b59163 NEWS: updated to version 25.0.0.7
Updated the NEWS with the shortlogs of version 25.0.0.6 and 25.0.0.7.

Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-30 19:20:10 +02:00
Enrico Weigelt, metux IT consult
53691f7174 os: xtranssock: undefine before redefining EADDRINUSE
prevent warning on doubly defined preprocessor symbol.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 19:09:44 +02:00
callmetango
cd81282968 config: Preserve section data when parsing duplicate files
Previously, when parsing multiple configuration files containing the same
section names, only the last occurrence of each section would be retained.
Earlier definitions were silently discarded due to unconditional memory
allocation and overwriting of pointers during parsing.

This resulted in incomplete or incorrect configuration state when users
intended to merge or extend configuration through multiple files.

The section parsing functions in Files.c, Flags.c, and Module.c now
accept existing section pointers. These functions allocate new memory only
if the input pointer is NULL, preserving earlier data when re-parsing.

read.c has been updated to detect and pass existing section pointers when
encountering duplicate sections across files, preventing loss of prior content.

With these changes, the parser properly accumulates and merges configuration
data across multiple files, ensuring that all relevant settings are preserved.

Backport from Xorg.

References:
https://gitlab.freedesktop.org/xorg/xserver/-/issues/467
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2045

Fixes: #279
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-30 16:44:58 +02:00
Enrico Weigelt, metux IT consult
9986e17950 meson: move MAXCLIENTS and LIMITCLIENTS into dix-config.h
Both are potentially tunable variables, and MAXCLIENTS is (still) used by
intel-driver, but also by os specific parts that must not include misc.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 14:55:40 +02:00
Oleh Nykyforchyn
0c23d26fb8 xserver: os/log.c: ignore alternate forms in log formats
This patch fixes Xserver crashes when evdev or synaptics input drivers are used.
These (and maybe other) driver use alternate forms "%#..." in formats for
xf86IDrvLogVerb() function, which in turn uses signal-safe vpnprintf().
The last function does not recognize alternate forms and exits abnormally, which
causes Xserver to crash. The patch make vpnprintf() to ignore alternate forms.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-07-29 16:21:02 +02:00
Oleh Nykyforchyn
d9330703c8 xserver: miext/sync/meson.build: compile misyncshm.c if xshmfence found
It is a patch that fixes xserver build if libdrm is too old.

Now misyncshm.c compilation depends on dri3, which is incorrect. If libdrm
is not recent enough, then dri3 is not built, the file misyncshm.c
is not compiled, and the function miSyncShmScreenInit() is unavailable.
It is called in glamor_sync.c if xshmfence is present, which causes
a compilation error. This patch makes misyncshm.c compile if xshmfence
is found.

Signed-off-by: Oleh Nykyforchyn <olen.nyk@gmail.com>
2025-07-29 14:20:51 +02:00
Enrico Weigelt, metux IT consult
c3b768802a record: stop using request length fields
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-29 11:45:53 +02:00
Enrico Weigelt, metux IT consult
e1bbe46cbf randr: drop swapping request length fields
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-29 11:45:53 +02:00
Enrico Weigelt, metux IT consult
5c3790511c Xext: ggext: drop swapping request length fields
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-29 11:45:53 +02:00
stefan11111
a956cfa211 config: fix build with -Dudev=false -Dudev_kms=true
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 17:24:05 +02:00
stefan11111
ed12dbbc18 meson.build: Check for libudev directly, instead of our flimsy os-speciffic guessing
Implement what was discussed in https://github.com/X11Libre/xserver/issues/478

Use dependency() instead of cc.check_header(), as the former is the
intended way to check for dependencies.

cc.check_headers would turn udev on on systems where libudev.h
is present, but libudev.pc isn't.

Thos would do the wrong thing on systems where the admin wants to
have that header for some reason, but doesn't want programs to use
libudev.

We also keep udev and udev_kms a tristate, so we try to do
the right thing when the user doesn't explicitly pass
values for udev and udev_kms.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 17:24:05 +02:00
Enrico Weigelt, metux IT consult
879bc0012d os: xdmcp: fix missing include of <X11/Xdmcp.h>
xdmcp.h is using types from <X11/Xdmcp.h>, but forgot to include it.
This just popped up with building w/ -Dxdmcp=false, because that file was
included in the wrong place (osdep.h) and only conditionally.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-28 16:20:58 +02:00
stefan11111
61017cf734 xfree86: fbdevhw: first try /dev/fb, then /dev/fb* on the fallback probe
This commit changes legacy behavior, if anyone was relying on it,
they can make an issue and we can change it back.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
4f2f3ffca1 xfree86: fbdevhw: write more error diagnostics
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
1e7c19a2ec xfree86: fbdevhw: try framebuffers 1 through 7 on the fallback probe
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
9b30bb93f3 xfree86: fbdevhw: try the /dev/fb symlink on the fallback probe
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
e3af4da57b xfree86: fbdevhw: factor out code for checking devices passed by the user
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
731936d20b xfree86: fbdevhw: skip non-pci check on the fallback probe
if the framebuffer device was passed by the user and not guessed

Assume the user knows what they are doing if they tell us to
use a particular framebuffer device, and skip the checks we
have for guessed devices

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
d61cface87 xfree86: fbdevhw: factor out the code for setting the name of the card
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
6233fa8b9f xfree86: fbdevhw: use the fbdev passed by the user, if there is one
The fbdev pci probe doesn't use the fbdev passed by the user,
and instead tries to guess what framebuffer the user wants to use.

Only if that fails, fbdev falls back to the option passed by the user.

This is backwards, if the user explicitly passes a framebuffer
device to use, the X server should use that, and fall back on
guessing if that fails.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
stefan11111
ca7a1e1e39 xfree86: fbdevhw: drop 'mode' argument from open() calls
The 'mode' argument for open() is only used when files
are created, and files aren't created here.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:35:25 +02:00
Enrico Weigelt, metux IT consult
0c261e0104 .github: fix intel driver repo url
Should not have `.git` suffix.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 17:14:25 +02:00
Enrico Weigelt, metux IT consult
296e7cb842 os: ospoll: add missing include of <assert.h>
We're using assert() here, so need to include <assert.h>

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 16:20:52 +02:00
Enrico Weigelt, metux IT consult
31c75dd68b os: ospoll: add missing include of <string.h>
Needed for memmove()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 16:20:27 +02:00
Enrico Weigelt, metux IT consult
1292b4bd39 os: ospoll: drop not needed including of X11 headers
Those just conflicting with win32/mingw headers on type `BOOL`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 16:10:01 +02:00
Enrico Weigelt, metux IT consult
2bee97548e os: move X_NOTIFY_* defines to separate header
These defines are already public, used by consumers of SetNotifyFd(),
but also needed in places where os.h cannot be included.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 15:21:13 +02:00
callmetango
4839966900 README.md: add mission statement and many more
Intensivly reworked the README to contain:
* what XLibre is
* a mission statement
* the achievements made since the fork from Xorg
* brief but working instructions how to switch to XLibre, build,
  configure and run it
* a link to the compatibilty wiki page
* a rough roadmap
* invitation to contribute, what and where
* an anybodys welcome
* slightly more contact information
* some shots of liberated screens

The historical context has been partially moved to the HISTORY.md
file.

Fixes: X11Libre/misc/issues/148
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-25 08:06:47 -04:00
callmetango
a0dbed7daa HISTORY.md: add brief overview of the XLibre fork
This file briefly documents the events surrounding the fork of Xorg
into XLibre without any commentary. It will be referenced by the
README.md.

Part-of: X11Libre/misc/issues/148
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-25 08:06:47 -04:00
callmetango
b6ed2398c7 NEWS: add new file for a brief changelog
Add a brief list of changes in the style of a git shortlog to inform the
users of the changes made on version increments. This file will be
referenced by the README.md.

Fixes: X11Libre/misc/issues/141
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-25 08:06:47 -04:00
Enrico Weigelt, metux IT consult
a5bcefbb90 .github: delete old workflows
Add nightly cron job for automatically cleaning up old workflow runs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 13:32:25 +02:00
Enrico Weigelt, metux IT consult
4fa6849f43 os: xtrans: drop define of EPROTOTYPE
Never used anywhere and conflicts with system headers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 12:44:14 +02:00
Enrico Weigelt, metux IT consult
ee1f0a3ac4 os: xtrans: drop define of ECONNREFUSED
Never used anywhere and conflicts with system headers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 12:30:12 +02:00
Enrico Weigelt, metux IT consult
4ee55d09b0 os: xtrans: fix _XSERVTransWSAStartup() prototype
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 09:56:31 +02:00
stefan11111
0d261275fa meson.build: Don't silently change the user's option regarding udev support
This can cause issues like: https://github.com/X11Libre/xserver/issues/397

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-24 20:22:26 +02:00
Enrico Weigelt, metux IT consult
04cd762890 README.md: update amdgpu driver version
update to xlibre-xf86-video-amdgpu-23.0.0.2

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 17:14:17 +02:00
b-aaz
1da93ea889 meson.build: Enabled udev for FreeBSD.
FreeBSD uses libudev-devd for a libudev compatible interface.
So the udev options should be available for it.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
2025-07-24 16:45:17 +02:00
Enrico Weigelt, metux IT consult
731ace6c13 dix: ProcGetMotionEvents(): simplify writing out xTimecoord
The swapping is so trivial, we don't need several extra functions
for that - just do it right where the header fields are swapped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 11:57:19 +02:00
Enrico Weigelt, metux IT consult
dcf7890076 Xace: always build xace
Xace callbacks are needed in many places, and the their overhead (when not
actually used) is really minimal. So it doesn't make much sense having
extra complexity for disabling it at build time.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 10:49:54 +02:00
Enrico Weigelt, metux IT consult
0580a054a4 Xace: drop XaceGetConnectionNumber()
It's just a wrapper around GetClientFd() - we can use this one directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 10:49:54 +02:00
Enrico Weigelt, metux IT consult
da58522087 Xace: drop XaceIsLocal()
Just a dumb wrapper to ClientIsLocal() - we can use this one directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 10:49:54 +02:00
Enrico Weigelt, metux IT consult
d74767107d panoramiX: PanoramiXGetImage(): write out payload in one block
Collect payload pieces into x_rpcbuf, so it can be written out once.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 19:51:24 +02:00
Enrico Weigelt, metux IT consult
81a79e9f8b panoramiX: ProcXineramaQueryScreens(): write out payload in one block
Collect payload pieces into x_rpcbuf, so it can be written out once.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 19:51:24 +02:00
dec05eba
7ab50432ba randr: fix prime sync atom not created correctly
The commit 30cec78 incorrectly changed RRInitPrimeSyncProps to not
create the atom if it doesn't exist.

Signed-off-by: dec05eba <dec05eba@protonmail.com>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 19:15:07 +02:00
Enrico Weigelt, metux IT consult
093286b434 xcmisc: drop SProcXCMiscDispatch()
It's now doing exactly the same as ProcXCMiscDispatch(), so it's not
actually needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 18:37:52 +02:00