Commit Graph

2215 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
15c08e9c82 dix: write out xGetModifierMappingReply reply 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
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
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
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
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
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
64c06e2318 bsd: drop PCCONS support
The old PCCONS driver only seems to be used on minimal install disks and
cannot coexist with newer ones, so there's probably no practical use case for
supporting it in Xorg 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
abdabefc8c (1853) dix: unexport ResizeVisualArray()
Not used by any drivers, and shouldn't be used by them.
Needs to _X_EXPORT'ed, as long as glx is a separate module.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:16 +01:00
Enrico Weigelt, metux IT consult
31fe0f9a9f (1854) Xi: unexport AssignTypeAndName()
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
9b5618b5ab (!1792) os: drop own implementation of strcasecmp() and strncasecmp()
These are POSIX standard since 2001, so shouldn't be needed 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
42f23753fe (!1688) meson.build: move writing conf_data into tail of main meson file
This allows us to do further probing in the included meson files:
Individual subdirectories (eg. DDXes, extensions, OS layer, ...)
can now probe things that are only relevant to them - no need to fill
the already too fat includes/meson.build with even more things.

Preparation for upcoming commits that'll make us of that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
0735510afb (!1688) os: unexport internal logging functions
Lots of logging functions, especially init and teardown aren't called
by any drivers/modules, so no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
e09546c5bd (submit/drop-cygwin) drop remains of cygwin support
Cygwin support doesn't seem to be used anymore, so it can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
18cec0e9e7 (submit/xnest-gcrec) fix name clash on 'GC' between Xlib and Xserver
Both xlib as well as the Xserver use the same identifier "GC" for
different types. While on xlib it's just the numerical ID of a GC,
the xserver defines a struct for it by the same name. This is this
ugly and needs ridiculous hacks for Xserver code that needs xlib.

Easy to solve by just renaming the GC typedef to GCRec (consistent
with how we're naming other structs) and replacing GC* by GCPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
2d84c9ff10 (submit/move-systemd-logind.h) move systemd-logind.h to hw/xfree86/os-support/linux
systemd is linux specific and the actual implementation is under the
os-support layer of xfree86 ddx. Thus no need to keep it in global
include directory, putting it onto the linux specific os-support instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
7170d0cd5a (submit/selection.h) dix: rename selection.h to selection_priv.h
rename it in order to reflects it's private nature (not exported).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
f3aed43777 (submit/selection.h) dix: unexport selection functions
No driver needs them, so no reason to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
cd345941c3 (submit/selection.h) dix: don't install selection.h anymore
This file isn't included by any driver - not even indirectly, and hard
to imagine any driver ever needs it, so no need to keep it installed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
827d6750a4 (submit/miext-extinit) miext: move over extinit_priv.h from include
Since most of the extension init logic (and on/off switches for them)
is driven from miext, this seems the appropriate place for the header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
23e90439f8 FIXME (submit/miext-extinit) composite: move noCompositeExtension into the extension code
This flag is better off in the extension code instead of the OS layer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
b4e492f8b8 (submit/miext-extinit) present: unexport present_extension_init()
It's not called by 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:15 +01:00
Enrico Weigelt, metux IT consult
0772074661 FIXME (submit/miext-extinit) panoramix: move noPanoramiXExtension field into extension.
This field is better of in the corresponding extension,
than in the OS layer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
ea8e66245e (submit/vrr-driver-api) dix: add generic Xinerama capable VRR infrastructure
We don't have a standard protocol for enabling VRR yet, but some time ago an
ad-hoc had been made in the amdgpu driver (later also copied to modsetting),
which works by client setting the _VARIABLE_REFRESH window property.

The way it's currently done - driver is highjacking the X_ChangeProperty and
X_DeleteProperty request handlers - is pretty fragile, and is also a violation
of layers: drivers never should be twisted with core protocol details. (And in
the future, this should be done by some suitable extension).

Another problem is Xinerama: when it's enabled, this only works on the first
screen - the others won't ever see this signal, no matter on which one(s) the
Window is physically placed (for the wire protocol, all windows are on screen 0,
unless the client explicitly creates them on another one)

This commit adds a generic Screen proc for telling the DDX, whether the VRR mode
shall be changed (for now, it's only DISABLED and ENABLED). Drivers can hook into
here in order to receive this signal, w/o having to highjack any core request
handlers. Catching the property change is now entirely done in the DIX.

The (non-standard) status qou of (ab)using window properties is kept, but it's
now also easy to add a new signaling mechanism, in case a standard is agreed on.

Yet a quite naive implementation (eg. not acting on moving windows between screens),
but enough to fix the most pressing problems supporting extra screens in general,
as well as stopping the highjacking of core request handlers by drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:15 +01:00
Enrico Weigelt, metux IT consult
75bf85bb36 (!1682) os: log: drop now meaningless XLOG_FLUSH option
Since we're not indirectly writing via FILE anymore, this option has
become meaningless: it meant flushing out our in-process buffer to
the kernel, but we're now doing direct write() calls anyways.

xf86 still accepts the "flush" config file flag for backwards compatibility,
but it hasn't any practical meaning anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:14 +01:00
Enrico Weigelt, metux IT consult
57ce720511 (!1714) dix: add per-screen pixmap destructor mechanism
Right now, extension specific pixmap destruction procedures are implemented
by wrapping the ScreenRec's DestroyPixmap() proc pointer: the extensions are
storing the original pointer in their private data and putting in their own one.
On each call, their proc restores the original one, calls it, and switches back
again. When multiple extensions doing so, they're forming a kind of daisy chain.
(the same is done for lots of other procs)

While that approach is looking nice and elegant on the drawing board, it's
complicated, dangerous like a chainsaw and makes debugging hard, leading to
pretty blurred API borders.

It's even getting worse: the proc also has to do ref counting, and only destroy
the pixmap if refconter reaching zero - that's all done in the individual screen
drivers. Therefore, all extensions must check for refcnt == 1, in order to know
when to really act.

This commit introduces a simple approach for letting extension hook into the
pixmap destruction safely, w/o having to care much about side effects with
the call chain. Extensions now can simply register their destructor proc
(and an opaque pointer) and get called back - w/o ever having to mess with
the ScreenRec's internal structures.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:14 +01:00
Enrico Weigelt, metux IT consult
07dc61c736 (!1714) dix: add per-screen close notify hook
Right now, extension specific actions on screen closing implemented by wrapping
the ScreenRec's PositionWindow() proc pointer: the extensions are storing the
original pointer in their private data and putting in their own one. On each
call, their proc restores the original one, calls it, and switches back again.
When multiple extensions doing so, they're forming a kind of daisy chain.
(the same is done for lots of other procs)

While that approach is looking nice and elegant on the drawing board, it's
complicated, dangerous like a chainsaw and makes debugging hard, leading to
pretty blurred API borders.

This commit introduces a simple approach for letting extension hook into the
screen closing path safely, w/o having to care much about side effects with
the call chain. Extensions now can simply register their hook proc (and an
opaque pointer) and get called back - w/o ever having to mess with the
ScreenRec's internal structures. These hooks are called before the original
vector (usually handled by DDX/screen driver directly) is called.

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