1467 Commits

Author SHA1 Message Date
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: 9508a382f8a9f241dab097d921b6d290c1c3a776
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:39:31 +02:00
Enrico Weigelt, metux IT consult
3880670da1 Xext: panoramix: cache screen pointer
locally cache the screen pointer in local variable.
follow-up commits will use a generic helper function for retrieving it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 10:49:49 +02:00
Enrico Weigelt, metux IT consult
ddee0a9397 Xext: saver: inline SProcScreenSaverQueryInfo()
The only actually effective line can be easily moved into
ProcScreenSaverQueryInfo()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 10:04:16 +02:00
Enrico Weigelt, metux IT consult
75d4cb0eeb Xext: dpms: inline the SProc's
The few instructions for byte-swapping are trivial enought to be inlined
into the actual request handlers, so we can reduce a lot of boilerplate.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 10:04:05 +02:00
Enrico Weigelt, metux IT consult
f288745d49 treewide: write xXineramaScreenInfo via x_rpcbuf_write_rect()
The xXineramaScreenInfo payload type has the same definition as xRectangle,
so we can just use x_rpcbuf_write_rect() for those.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:34:00 +02:00
Enrico Weigelt, metux IT consult
f8ad69698a treewide return code of X_SEND_REPLY_WITH_RPCBUF()
The macro will automatically return BadAlloc if the buffer is broken,
otherwise Success. Thus, we don't need extra prior rpcbuf check.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 12:48:50 +02:00
stefan11111
d806890aae Xext: fix comments when assembling xXF86VidModeModeInfo reply
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-01 11:13:13 +02:00
Enrico Weigelt, metux IT consult
065efcb5d9 Xext: xres: use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 16:11:06 +02:00
Enrico Weigelt, metux IT consult
6ba9edc2b8 Xext: selinux: use x_rpcbuf_t for reply assembly
Use x_rpcbuf_t and associated macros for assembling and sending replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 16:03:17 +02:00
stefan11111
c0017acbaf Xext: add missing implicit padding to vidmode fillModeInfoV2
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-28 10:28:53 +02:00
stefan11111
dc6c3c39c2 Xext: Fix Xv reply
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-27 16:36:18 +02:00
Enrico Weigelt, metux IT consult
627fde42df Xext: xres: fix XResQueryClientResources request
been using the wrong index for retrieving the resource type atom.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-27 11:39:53 +02:00
Enrico Weigelt, metux IT consult
e1315e22db Xext: security: use x_rpcbuf_t for reply payload assembly
Use x_rpcbuf_t for reply payload and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-26 10:52:14 +02:00
Enrico Weigelt, metux IT consult
cd86e5f69a Xext: canonical naming for reply structs
Let all reply structs be called `reply`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-26 10:15:40 +02:00
Enrico Weigelt, metux IT consult
8dc3f88c8d xext: vidmode: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-25 09:32:53 +02:00
Enrico Weigelt, metux IT consult
e96a34217d sync: ProcSyncListSystemCounters(): use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly, and sending out the whole
thing via X_SEND_REPLY_WITH_RPCBUF().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-24 12:41:39 +02:00
Enrico Weigelt, metux IT consult
a17a01bed4 xext: bigreq: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-24 12:41:19 +02:00
Enrico Weigelt, metux IT consult
7aa06ee749 Xext: replace WriteRpcbufToClient() by X_SEND_REPLY_WITH_RPCBUF() macro
Use the new X_SEND_REPLY_WITH_RPCBUF() macro for final reply write out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-24 12:11:31 +02:00
Enrico Weigelt, metux IT consult
6da88ce171 xext: sync: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-24 12:09:34 +02:00
Enrico Weigelt, metux IT consult
7a4136d0ff xext: panoramix: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-24 12:08:32 +02:00
Enrico Weigelt, metux IT consult
0c4f5e430a xext: security: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-24 12:08:20 +02:00
Enrico Weigelt, metux IT consult
5b38596e70 xres: ProcXResQueryClients(): use X_SEND_REPLY_WITH_RPCBUF() macro
Use the new X_SEND_REPLY_WITH_RPCBUF() macro for final reply write out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:44:27 +02:00
Enrico Weigelt, metux IT consult
9b640c0fd7 xext: xcmisc: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:37:51 +02:00
Enrico Weigelt, metux IT consult
0bf7d613d5 xf86vidmode: ProcVidModeSetGammaRamp(): use x_rpcbuf_t
Use x_rpcbuf_t for assembling reply payload.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:28:11 +02:00
Enrico Weigelt, metux IT consult
2c2ce8bfea xf86bigfont: ProcXF86BigfontQueryFont(): use x_rpcbuf_t
Use x_rpcbuf_t instead of our own local buffer for the reply
payload assembly and byte-swapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:27:58 +02:00
Enrico Weigelt, metux IT consult
4a286358f4 xext: dpms: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:25:05 +02:00
Enrico Weigelt, metux IT consult
104a7f6b4c xext: xtest: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:24:40 +02:00
Enrico Weigelt, metux IT consult
272995f32a xext: xres: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:24:32 +02:00
Enrico Weigelt, metux IT consult
ab597b8d98 xext: xf86bigfont: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:24:20 +02:00
Enrico Weigelt, metux IT consult
0f0d95d50a xext: xv: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:23:52 +02:00
Enrico Weigelt, metux IT consult
a98e7755eb xext: shm: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:23:41 +02:00
Enrico Weigelt, metux IT consult
c36eeb24a7 xext: xvmc: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:23:19 +02:00
Enrico Weigelt, metux IT consult
f69c8746d1 xext: shape: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:22:37 +02:00
Enrico Weigelt, metux IT consult
0b10a36c8a xext: selinux: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:22:20 +02:00
Enrico Weigelt, metux IT consult
d983c4137d xext: saver: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:18:45 +02:00
Enrico Weigelt, metux IT consult
34195741b7 xext: geext: use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:15:02 +02:00
Enrico Weigelt, metux IT consult
d6089c52c3 treewide: macro for computing extra units needed for reply header
Add and use macro X_REPLY_HEADER_UNITS() for computing how many
extra protocol units are needed for a reply header (for .length field)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 14:14:32 +02:00
Enrico Weigelt, metux IT consult
bb6a70be0f panoramix: XineramaGetImageData() split out code inside the big loop
Split out the code inside the big for-each-screen loop into separate
function.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 13:39:09 +02:00