Commit Graph

1454 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
8e68c8d514 dix: replace XACE_CLIENT_ACCESS by direct callback
Move the callbacks directly into DIX, since it's actually core infrastructure.
Also simplifying the whole machinery, by just using a simpel CallbackListPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:24:13 +02:00
Enrico Weigelt, metux IT consult
3851c97247 xv: drop forgotten SProcXvDispatch() prototype
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:23:48 +02:00
Enrico Weigelt, metux IT consult
8a5ac961ca Xvmc: inline SProcXvMCDispatch()
No need for an extra function for a one-liner.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:23:36 +02:00
Enrico Weigelt, metux IT consult
ca484055c7 dix: unexport screen saver parameters
Not used by any external drivers, so no need to keep them in public
SDK headers. Since they're never used by drivers, it's effectively
not an ABI change, so can safely be done within ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:01:21 +02:00
Enrico Weigelt, metux IT consult
f333cac5c2 Xext: namespace: fix NULL derefence on client close
Removing the namespace assignment of killed clients in ClientState-hook
is too early - we still need it later. Using the new ClientDestroyCallback
instead.

Closes: https://github.com/X11Libre/xserver/issues/486
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-26 16:28:17 +02:00
Enrico Weigelt, metux IT consult
995398ecde os: rename audit.h to audit_priv.h
Our convention is naming private (non-SDK) headers w/ _priv.h suffix.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-26 15:56:47 +02:00
Enrico Weigelt, metux IT consult
7afa753652 Xext: drop PanoramiXGCKey and PanoramiXScreenKey macros
We can directly use the actual fields, no need for these extra macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-26 15:38:07 +02:00
Enrico Weigelt, metux IT consult
6d00346893 Xext: xv: drop XvScreenKey macro
We can easily use &XvScreenKeyRec directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-26 15:35:25 +02:00
Enrico Weigelt, metux IT consult
6168868906 dix: replace XACE_SERVER_ACCESS by direct callback
Move the callbacks directly into DIX, since it's actually core infrastructure.
Also simplifying the whole machinery, by just using a simpel CallbackListPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-25 14:27:41 +02:00
Enrico Weigelt, metux IT consult
678b025df5 include: misc.h: drop duplicate definition of CallbackListPtr
This type is already defined in `include/callback.h` - anybody who wants it
most likely needs that include file, too.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-25 09:36:53 +02:00
Enrico Weigelt, metux IT consult
36facd71b5 dix: move request/response related functions to new request_priv.h header
Move functions/macros dealing with request parsing or reply assembly/write
out of the big dix_priv.h into their own headers. This new header will also
get more of those function/macros soon (yet still in the pipeline).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-24 11:32:50 +02:00
Enrico Weigelt, metux IT consult
3e5bb95a82 xace: drop obsolete/unused XaceAuditRec
This struct isn't used anymore for almost a decade, just a left over from
audit hooks removal, back in 2016.

Fixes: 6cb34816af
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-23 12:14:14 +02:00
Enrico Weigelt, metux IT consult
ac0a267f1d xace: drop unused XACE_AUTH_AVAIL
Not used anymore for almost two decades, so no need to keep it.

Fixes: eafaf40fb3
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-23 11:44:14 +02:00
Enrico Weigelt, metux IT consult
96b5da5a0d dix: replace XACE_EXT_ACCESS and XACE_EXT_DISPATCH by direct callback
Move the callbacks directly into DIX, since it's actually core infrastructure.
Also simplifying the whole machinery, by just using a simpel CallbackListPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-23 11:37:50 +02:00
Enrico Weigelt, metux IT consult
d82aa8308d xace: drop never used XACE_KEY_AVAIL
This hook was never used, so no need to keep around something that's
really not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-23 11:26:19 +02:00
Enrico Weigelt, metux IT consult
85cf8f0be4 Xext: Xv: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:55:13 +02:00
Enrico Weigelt, metux IT consult
3179c51bee Xext: Xv: use return value X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:49:55 +02:00
Enrico Weigelt, metux IT consult
39d0d9cb96 xselinux: use return code of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:49:43 +02:00
Enrico Weigelt, metux IT consult
94fc59c292 xselinux: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:49:33 +02:00
Enrico Weigelt, metux IT consult
a6f629cbaa Xext: Xi: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-22 12:13:27 +02:00
stefan11111
a4d08427cf Xext: composite: xfixes: Fix warnings when building with -Dxinerama=false
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-22 12:12:48 +02:00
Enrico Weigelt, metux IT consult
9e209798f1 Xext: panoramix: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-17 09:46:27 +02:00
Enrico Weigelt, metux IT consult
03b2e9d1ad Xext: xv: suppress false alarm on unused typedef
> In file included from ../Xext/xvdisp.c:33:
> ../Xext/xvdisp.c: In function ‘ProcXvQueryImageAttributes’:
> ../Xext/xvdisp.c:768:19: warning: typedef ‘int_size_wrong_’ locally defined but not used [-Wunused-local-typedefs]
>  768 |     __size_assert(int, sizeof(INT32));
>      |                   ^~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-15 16:17:26 +02:00
stefan11111
dbfd395b28 Xext: add __size_assert in xvdisp.c
See: https://github.com/X11Libre/xserver/pull/1021
See: https://github.com/X11Libre/xserver/issues/706

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-15 13:39:03 +02:00
stefan11111
fd3af5fc7a Xext: Fix type mismatch in xvdisp.c
Fixes: https://github.com/X11Libre/xserver/issues/706

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-15 11:23:48 +02:00
Enrico Weigelt, metux IT consult
a1522644ff Xext: vidmode: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-12 15:37:25 +02:00
Enrico Weigelt, metux IT consult
358f76f2ad treewide: fix misleading firstScreen variable naming to masterScreen
Follow-up on renaming dixGetFirstScreenPtr() to dixGetMasterScreen():
also rename the target variables for correct technical terminology.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-12 11:44:05 +02:00
Enrico Weigelt, metux IT consult
b0ffa7b286 treewide: rename dixGetFirstScreenPtr() to dixGetMasterScreen() for correct semantics
In Xinerama/Panoramix configuration there's one screen that's having special
meaning - it's used for simulating as the frontend for all client operations:
the clients (should) only talk to that screen, while panoramix subsystem is
proxying those operations to all the other screens (with certain changed
applied, eg. coordinate transformations).

Historically, this screen happens to be the first one in the system (some of
it's proc's are hooked up in order to achieve desired behaviour). That's why it
used to be accessed via screenInfo.screens[0] - that already had been encapsulated
into a tiny helper `dixGetFirstScreen()`.

a) the correct terminus technicus for a situation where one device (or SW entity)
   entirely controlling others is a master-slave-relationship: the controlling
   device/entity is `master`, the controlled ones are `slave` (to that specific
   master).

b) the term "first screen" is inacurate and misleading here: what the caller's are
   actually interest in isn't the first entry in the screen array, but the screen
   that's controlling the others. With upcoming refactoring of the Xinerama/Panoramix
   subsystem, this might well be a different array index than 0.

c) the term `default` also wouldn't match: `default` implies there's a real practical
   choice, and such value applies when no explicit choice has been made. But in this
   case, it practically doesn't make sense (except perhaps for debugging purpose)
   for a client to use any different screen.

Therefore fixing the function name to the correct technical terminology.
(for sake of patch readability, renaming corresponding variables is left to
subsequent patches).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-12 11:44:05 +02:00
Enrico Weigelt, metux IT consult
f419bd3ac3 Xext: xtest: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-12 10:01:37 +02:00
Enrico Weigelt, metux IT consult
9705a5d7af xf86bigfont: security: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-12 10:01:24 +02:00
Enrico Weigelt, metux IT consult
6627ca7a6e Xext: damage: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-12 10:01:11 +02:00
Enrico Weigelt, metux IT consult
e474b81a45 damage: move the extension under the Xext directory
Tidying up the source tree structure a bit.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-10 17:06:13 +02:00
Enrico Weigelt, metux IT consult
b9b43e92eb xf86bigfont: drop obsolete SProcXF86BigfontQueryVersion()
It's doing nothing but calling ProcXF86BigfontQueryVersion(), so
we can call that function directly in the swapped dispatcher and
get rid of SProcXF86BigfontQueryVersion() entirely.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-10 13:45:29 +02:00
Enrico Weigelt, metux IT consult
6bc438ab5a treewide: use inline helper for accessing first screen
Instead of everybody directly accessing the (internal) screenInfo struct,
let those consumers only interested in first screen use a little helper.

Also caching the value if it's needed several times.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-10 13:45:05 +02:00
Enrico Weigelt, metux IT consult
d0a155c824 panoramix: drop unnecessary extern declarations
functions declarations are extern by default, no need to write it
explicitly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-10 13:43:29 +02:00
Enrico Weigelt, metux IT consult
c349470433 Xext: geext: drop GEClientPrivateKey
Don't need actually need that extra macro, we can just write
&GEClientPrivateKeyRec in those few places.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-10 13:41:29 +02:00
Enrico Weigelt, metux IT consult
c0beda902a Xext: xf86bigfont: use retval of X_SEND_REPLY_SIMPLE()
In ProcXF86BigfontQueryVersion(), return the retval of the
X_SEND_REPLY_SIMPLE() call.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-10 10:37:56 +02:00
Enrico Weigelt, metux IT consult
a324351f67 treewide: drop unnecessary includes of Xi/eglobals.h
Dropping include by sources that don't use anything from this header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-09 14:41:10 +02:00
Enrico Weigelt, metux IT consult
eb17b34362 Xinerama: lambda-esque macro for walking Xinerama screens
Move the walking loops on Xinerama screens into lambda-esque macros:
the callers look quite like we've been using lambda functions and
closures, but actually are just fancy macro trickery.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-09 14:12:40 +02:00
Enrico Weigelt, metux IT consult
f58b56a79f Xext: dpms: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 19:25:24 +02:00
Enrico Weigelt, metux IT consult
f598186c0d Xext: canonical walkScreenIdx variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreenIdx` for holding current screen index everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 17:40:42 +02:00
Enrico Weigelt, metux IT consult
b97378b3b5 Xext: security: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 17:40:23 +02:00
Enrico Weigelt, metux IT consult
49ddc8b3ec Xext: shape: inline request swapping
It's so trivial that those few lines can easily be inlined into
the actual request handler.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 10:20:56 +02:00
Enrico Weigelt, metux IT consult
7f4bef0174 Xext: GE: inline request swapping
It's so trivial that those few lines can easily be inlined into
the actual request handler.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 09:58:35 +02:00
Enrico Weigelt, metux IT consult
470cca48d3 Xext: saver: inline request swapping
It's so trivial that those few lines can easily be inlined into
the actual request handler.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 09:57:38 +02:00
Enrico Weigelt, metux IT consult
f76fc2607d Xext: sync: inline request swapping
It's so trivial that those few lines can easily be inlined into
the actual request handler.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 09:57:26 +02:00
Enrico Weigelt, metux IT consult
0d5cf8f610 Xext: shm: drop useless byte-swapping
SHM can *only* be used locally by definition, so the case of having
a byte-swapped client doesn't exist at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 09:57:14 +02:00
Enrico Weigelt, metux IT consult
55e70f1110 Xext: xvmc: use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 14:39:17 +02:00
Enrico Weigelt, metux IT consult
f9ae5def14 Xext: panoramix: drop dead code path on GLXPROXY symbol
This symbol doesn't seem to be defined ever (neither in Xorg tree, nor
any headers) - it's a relic from DMX, which had been removed aeons ago.
So let's drop that dead code path.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:49:32 +02:00
Enrico Weigelt, metux IT consult
ac4408b929 Xvmc: add reply byte-swapping
In 22 years, nobody ever implemented byte-swapping here.

Fixes: 9508a382f8
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:39:31 +02:00