Commit Graph

20975 Commits

Author SHA1 Message Date
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
Enrico Weigelt, metux IT consult
48f8aad89b xkb: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
39ef9586be randr: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
16246adc8e Xi: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
ef420e43be Xext: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
8454c94773 xwin: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
b001470c81 xquartz: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
9217a30960 xnest: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
77a91598fe vfb: use dixAddAtom()
Use the new helper for creating atoms on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
ec277d2c0b xfree86: use dixAddAtom()
Use the new helper for creating atoms.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
fd6467fa78 miext: use dixAddAtom()
Use the new dixAddAtom() helper for creating atoms.
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
dbe1871772 glamor: use dixAddAtom()
Use the new dixAddAtom() helper for creating atoms.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
63cdf161d3 dix: add dixAddAtom()
Convenient helper function for creating atom and get it's ID.
If atom already exist, the existing ID is retrieved.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
c32b5b4d5b xfixes: use dixGetAtomID()
Use the new shortcut helper for cases where we need to check
whether an atom exists and retrieve it's ID.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
30cec786e5 randr: use dixGetAtomID()
Use the new shortcut helper for cases where we need to check
whether an atom exists and retrieve it's ID.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
9a60579994 dix: add dixGetAtomID()
Helper function for retrieving _existing_ atom ID for given name.
If atom doesn't exist yet, it won't be created, but returning None instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
02a88519a2 xfree86: xf86UpdateHasVTProperty(): always create atom
No need to have extra check for whether the Atom already exists,
just create it on demand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:24:27 +02:00
Enrico Weigelt, metux IT consult
42daf8e53e Xi: drop using HAVE_DIX_CONFIG_H
This symbol is always defined, and the header is always present,
so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 12:23:06 +02:00
Enrico Weigelt, metux IT consult
ed4cf4e813 dbe: drop using HAVE_DIX_CONFIG_H
This symbol is always defined, and the header is always present,
so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 11:21:37 +02:00
Enrico Weigelt, metux IT consult
4d722e5cc0 damage: drop using HAVE_DIX_CONFIG_H
This symbol is always defined, and the header is always present,
so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 11:21:24 +02:00
Enrico Weigelt, metux IT consult
171862626e xfree86: i2c: constify I2CBusRec::name
The bus name is always assigned to string literals, thus pointing to
constant data.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-23 11:17:09 +02:00
Enrico Weigelt, metux IT consult
e0440a0b42 xfree86: simplify match group destruction
Reducing repeated code patterns by simple function call.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-22 16:43:12 +02:00
Mike Gelfand
d46e9acd6f .github: bump xts to current master
After the recent fixes, no patching it required to build on Mac.

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-07-22 11:07:43 +02:00
Enrico Weigelt, metux IT consult
85a66a723f xfree86: fbdevhw: fix bdevHWInit() parameter
device name should be const char *.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-21 22:24:18 +02:00