Commit Graph

20998 Commits

Author SHA1 Message Date
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
Enrico Weigelt, metux IT consult
f1263be6b7 xcmisc: consolidate (S)ProcXCMiscGetXIDList()
Move conditional swapping of request fields into main request handler,
no extra swapped handler needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 18:37:52 +02:00
Enrico Weigelt, metux IT consult
8ec51b64e8 xcmisc: consolidate (S)ProcXCMiscGetVersion()
Move conditional swapping of request fields into main request handler,
no extra swapped handler needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 18:37:52 +02:00
Enrico Weigelt, metux IT consult
f50b238fe1 xcmisc: ProcXCMiscGetXIDList(): declare variables where used first
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 18:37:52 +02:00
Enrico Weigelt, metux IT consult
f8fd9f7287 xcmisc: ProcXCMiscGetXIDRange(): declare variables where used
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 18:37:52 +02:00
Enrico Weigelt, metux IT consult
7539bdb829 xcmisc: ProcXCMiscGetXIDList(): use x_rpcbuf for payload assembly
Use x_rpcbuf for reply payload assembly, instead of pre-counting and
pre-allocating buffer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 18:37:52 +02:00
Enrico Weigelt, metux IT consult
aca6872193 xfree86: drivers: move inputtest into input subdir
In preparation of potentially more drivers being move in-tree,
put the input drivers into `input` subdirectory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 17:54:22 +02:00
Enrico Weigelt, metux IT consult
baa36c8a39 xfree86: drivers: move modesetting into video subdir
In preparation of potentially more drivers being move in-tree,
put the video drivers into `video` subdirectory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 17:54:22 +02:00
Enrico Weigelt, metux IT consult
ed47ec4bcb dix: rpcbuf: don't clear memory unless requested explicitly
Instead of always zero'ing out the whole buffer at allocation time, only
do it where really necessary. Also adding x_rpcbuf_reserve0() for reserving
buffer space that's explicitly cleared.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 17:26:25 +02:00
Enrico Weigelt, metux IT consult
123652228e dix: rpcbuf: use x_rpcbuf_t instead of struct x_rpcbuf
Both are the same types, the `struct x_rpcbuf` still remains, but it
seems more clear to use the `x_rpcbuf_t` as the canonical name.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 17:26:25 +02:00
dec05eba
0797119176 Revert "xfixes: use dixGetAtomID()"
This reverts commit c32b5b4d5b.

The commit writes out of bounds with tchar[stuff->nbytes] write
since the string isn't null terminated.
This messed other data which makes requests fail and window managers/
desktop environments fail to start.

ProcXFixesSetCursorName also incorrectly uses dixGetAtomID
which doesn't create the atom if it doesn't exist, which it previously
did with MakeAtom(..., TRUE).

The new dixGet/AddAtom methods dont work without null-terminated strings
so the change has to be reverted instead.

Signed-off-by: dec05eba <dec05eba@protonmail.com>
2025-07-23 17:25:05 +02:00
Enrico Weigelt, metux IT consult
75a6b756f1 Xext: shape: ProcShapeQueryExtents(): consolidate reply struct assembly
Consolidate reply struct assembly into one big struct initializer,
no more later assignments. Preparation for more upcoming consolidations
via generic macros for simple byteswapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:43:01 +02:00
Enrico Weigelt, metux IT consult
1ddfce3ae6 Xext: shape: ProcShapeQueryExtents(): scope and separate variables
declare variables right where they're needed, don't reuse variables
for several things and scope only short-lived ones.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:43:01 +02:00
Enrico Weigelt, metux IT consult
ac319a136b Xext: shape: ProcShapeGetRectangles(): use x_rpcbuf_t
Use x_rpcbuf_t for assembling reply payload and byte-swapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:43:01 +02:00
Enrico Weigelt, metux IT consult
b847ecb9a3 Xext: shape: consolidate reply struct declarations
a) always declare and initialize in one step
b) drop unncessary zero-values

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:43:01 +02:00
stefan11111
bd1e299837 kdrive: add OS/platform callback for event polling
And OS/platform callback by which individual server implementations
can extra event polling, eg. device IO.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:41:33 +02:00
stefan11111
b75dfe3d58 kdrive: add OS/platform callback for screen enable/disable
New OS/platform callbacks that are called when screens are enabled
or disabled. This allows individual Kdrive implementations to take
specific action, eg. configure/reset graphics hardware.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:41:33 +02:00
stefan11111
889dc612cf kdrive: add OS/platform specific bell callback
Allow OS/platform specific bell implementation.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 16:41:33 +02:00
Collin
8ba351aa96 screen: initialize rootDepth to zero to fix uninitialized-variable warning 2025-07-23 16:09:52 +02:00
Varad Dixit
a337b8cf38 Fix minor punctuation error in manual page
Change one occurence of 'comma separated' to 'comma-separated' in manual page
2025-07-23 16:07:52 +02:00
Enrico Weigelt, metux IT consult
86b392979e dix: don't include dix-config.h from randrstr.h
This header needs to be included in all sources at the very top anyways,
so no need to do it in other headers, too.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 15:46:51 +02:00
Oleh Nykyforchyn
3fd14fdb12 mi: midispcur.c.: move miDCCloseScreen to post-hooks
This change is necessary to fix a segfault in intel driver at CloseScreen.
sna_early_close_screen() releases the cursor using FreeCursor(), which needs
miDCScreen private of pScreen. It has already been released by miDCCloseScreen(),
which is a pre-hook, and segfault occurs. Hence it is necessary to move
miDCCloseScreen() to post-hooks.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-07-23 15:25:37 +02:00
Oleh Nykyforchyn
3f6e1bef3b render: picture.c.: move PictureScreenClose to post-hooks
This change is necessary to fix a segfault in intel driver at CloseScreen.
sna_early_close_screen() releases the glyph cache using FreePicture(), which needs
PictureScreen private of pScreen. It has already been released by PictureScreenClose(),
which is a pre-hook, and segfault occurs. Hence it is necessary to move
PictureScreenClose() to post-hooks.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-07-23 15:25:37 +02:00
Enrico Weigelt, metux IT consult
e7a26255f7 xfree86: meson.bulid: move driver specific build logic to drivers/ subdir
For better code structuring, move the meson logic for drivers into the
drivers/ subdir.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 15:24:38 +02:00
Collin
398b4ed1e7 XKBMAlloc: Solve CodeQL Alert Potential use after double free 2025-07-23 14:40:42 +02:00
probonopd
8c87190998 Remove libselinux1-dev
Should hopefully build without it; if not, we should fix that
2025-07-23 14:23:12 +02:00