Commit Graph

19983 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
c7ded3fc6c dix: write out xGetKeyboardMappingReply directly 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
917671c83c dix: write out xGetPointerMappingReply directly 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
c03bace48c dix: write out xSetPointerMappingReply directly 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
15c08e9c82 dix: write out xGetModifierMappingReply reply directly 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
0f50c8ad58 dix: write out xSetModifierMappingReply directly 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
b7ef0308a9 dix: write out xGetSelectionOwnerReply directly 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
8e82581291 dix: write out xGetImageReply directly
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
1df9010e6b dix: write out TranslateCoordsReply directly
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
d07e8dfd9a dix: write out xGetGeometryReply directly
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
f98bc2ec60 dix: consolidate ProcGetGeometry()
No need to have it split into two functions one just wrapping
another, so move it all into one.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
8d5eba2f16 xwin: fix NULL parameter in printf arguments
> ../hw/xwin/winprefs.c:625:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
>  625 |         ErrorF("LoadPreferences: %s not found\n", path);
>      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
dfa0ef3965 it's time to add a CoC (code of conduct)
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
49e8379911 WIP: qxl 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
a2f5e06b62 WIP: own qxl driver 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
8731b6d9a1 dix: unexport and document GetXIDRange()
Not used by any drivers (just the xcmisc extension), so no need
to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
772cc974f7 dix: unexport and document GetXIDList()
Not used by any drivers (just the xcmisc extension), so no need
to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
ef5ff67106 dix: unexport and document HashResourceID()
Not used by any drivers/modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
a7dd0fee34 dix: make CLIENTOFFSET macro private
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
ec110f8b27 dix: make RESOURCE_ID_MASK private
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
cb83623942 dix: make RESOURCE_CLIENT_MASK macro private
Not used in any external modules, so no need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
9d76b95398 dix: make CLIENT_BITS() macro private
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
9a65990286 dix: make SERVER_BIT define private
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
1e6b113d8b dix: make SameClient() macro private
Not used in any external modules, so need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
d60d4203d0 dix: add dixResouceIsServerOwned()
Little helper function for checking whether a resource XID
belongs to the server itself.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
1a30560a62 dix: let CreateGrab operate on ClientPtr instead of array index
Almost all callers have ClientPtr anyways, so we're just doing duplicate
array lookups. Just using ClientPtr directly is easier anyways.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
ce1af03c59 dix: CreateColormap() pass in ClientPtr instead of client index
The function actually operates on ClientRec, so we can pass it in
directly, so it doesn't need to fetch it from clients[] array itself.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
92f466083f dix: add dixClientForXID()
Retrieves the ClientPtr for the owner of given resource.
This way reducing the sites directly accessing clients[] array.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
d12d6c76f9 include/resource.h: replace RESOURCE_CLIENT_BITS by ResourceClientBits()
We can write down the function name directly. Nobody else than a few
define's in here using that macro.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
15602cd8bc dix: replace CLIENT_ID() macro by dixClientIdForXID() inline function
Make it type-safe and a bit more obvious what it really does,
also adding some inline documentation. Since it's just some
bit shifting magic, it's qualified for inlining.

The CLIENT_ID() macro isn't used by any external modules, so the
new function doesn't need to be in a public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
3342a12d33 dix: add dixClientForOtherClients()
Helper function for retrieving the owning client of an OtherClients.

It's an actual function, so callers don't need access to internal
knowledge (definition of struct _OtherClients, clients[] array, ...)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
2235fe31e8 dix: add dixClientForInputClients()
Helper function for retrieving the owning client of an InputClients.

It's an actual function, so callers don't need access to internal
knowledge (definition of struct _InputClients, clients[] array, ...)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
09ec4580fb dix: add dixClientForGrab()
Helper function for retrieving the owning client of a grab.

It's an actual function, so callers don't need access to internal
knowledge (definition of GrabRec, clients[] array, ...)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
62a9498375 dix: replace wClient() macro by dixClientForWindow() inline function
Hide internals (drop the need to include windowstr.h), make it typesafe
as well as the naming easier to understand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
e940430c2f os: drop deprecated Xprintf()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
105d28ba52 os: drop deprecated XNFvprintf()
Nobody using it anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
c1cf0c40af os: drop deprecated XNFprintf()
Nobody using it anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
32848e0373 os: drop deprecated Xvprintf()
Nobody using it anymore, so no need for keeping it around.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
6eb87ed3f1 os: drop Xasprintf() and Xvasprintf()
The supported platforms already have asprintf() and vasprintf(),
so there's no need for having our own implementation anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
6619b83f71 os-support: systemd-logind: don't hard-crash Xserver on strdup() fail
No need to directly hard-crash the Xserver when strdup() fails, instead
try to handle the situation gracefully.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
0a24b37f42 xkb: XkbInitRules() don't hard-crash the server on strdup() fail
No need to hard-crash the whole server if some strdup() calls failing,
those fields already may be NULL, so consumers can handle that situation.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
978b656ea1 xkb: ddxLoad: don't crash the server when strcpy() fails
No need for RunXkbComp() to hard-crash (by calling XNFstrdup()) the server
if strdup() fails to allocate more memory - it's callers already handling
the situation gracefully.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
6cedcffc10 WIP: fix driver builds 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
1bb190b843 WIP 2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
714d0b4f25 xkb: unexport XkbRF_VarDefsRec struct
No used outside of xkb, so no need to keep it in public API header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
7d1221b494 (nomerge) mark includes that have been scanned for obsolete exports
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
59809704e9 dix: unexport CountBits()
Not used by any drivers/modules, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
a00d2716d7 ci: drop armsoc driver
Last commit from 2016, almost a decade ago, seems dead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
abe8043edd Revert "dix: move LOCO struct declaration out of public header"
FIXME: the type LOCO is still used by certain drivers - but only a pointer
to it. We'll first have to introduce an opaque pointer type and convert
those drivers, before we can drop LOCO from public interface.

This reverts commit 658e83f816d42ec594a36139f35c577da752cc88.
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
375ca0abc3 dix: move LOCO struct declaration out of public header
Not used by any external module/driver, so no need to keep it in
public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
afe086b654 WIP: artifacts 4 2026-02-02 17:35:16 +01:00