Commit Graph

1346 Commits

Author SHA1 Message Date
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
Enrico Weigelt, metux IT consult
8ea70e9e78 treewide: use use x_rpcbuf_wsize_units() instead of rpcbuf.wpos
In the request handlers, use x_rpcbuf_wsize_units() for payload length
computation.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-19 15:50:54 +02:00
Enrico Weigelt, metux IT consult
bca6d2ddcd vidmode: ProcVidModeGetMonitor(): create reply struct right before send
Move the declaration of the reply struct down to after the payload has
been finally assembled, so we don't need extra payload size compuation
anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 17:42:13 +02:00
Enrico Weigelt, metux IT consult
4a57142388 vidmode: ProcVidModeGetDotClocks(): use x_rpcbuf_t for payload assembly
Use x_rpcbuf_t for reply payload assembly, instead of pre-counting and
pre-allocating buffer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 17:42:13 +02:00
Enrico Weigelt, metux IT consult
df98365a3c vidmode: ProcVidModeGetMonitor(): use x_rpcbuf_t for payload assembly
Use x_rpcbuf_t for reply payload assembly, instead of pre-counting and
pre-allocating buffer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 17:42:13 +02:00
Enrico Weigelt, metux IT consult
b33244566c vidmode: ProcVidModeGetAllModeLines(): drop length computation
Since the x_rpcbuf already knows how much had been written, there's no
need for extra payload size computation anymore - just pick the number
of written bytes from the x_rpcbuf.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 17:42:13 +02:00
Enrico Weigelt, metux IT consult
bf41f83c67 vidmode: fillModeInfoV*(): use x_rpcbuf_t for byte-swapping
use x_rpcbuf_t operations for constructing the reply payload, so we don't
need to do the byte-swapping explicitly anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 17:42:13 +02:00
Enrico Weigelt, metux IT consult
954c6e2c29 vidmode: fillModeInfoV*(): use x_rpcbuf_t
Second step of migrating ProcVidModeGetAllModeLines() to x_rpcbuf_t:
Let it's callees also use x_rpcbuf_t operations, instead of raw pointers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 17:42:13 +02:00
Enrico Weigelt, metux IT consult
c9bd4cc4df vidmode: ProcVidModeGetAllModeLines(): use x_rpcbuf_t
First step of migration to x_rpcbuf: create a buffer with enough room for
the already calculated payload size and pass the raw buffer pointer to
our callees as we used to do with the calloc()ed one.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 17:42:13 +02:00
Enrico Weigelt, metux IT consult
c10baabc89 xres: ProcXResQueryClients(): use x_rpcbuf_t
use x_rpcbuf_t for reply payload assembly and byte-swapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 17:27:15 +02:00
Enrico Weigelt, metux IT consult
29005e9873 shape: 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-18 11:16:23 +02:00
Enrico Weigelt, metux IT consult
d81cf93329 Xext: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
stefan11111
828135fd3e dix: Xext: replace bytes_to_int32(pad_to_int32(x)) with bytes_to_int32(x)
bytes_to_int32 already adds padding, no need to compute that too.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-14 12:55:00 +02:00
Enrico Weigelt, metux IT consult
02737a1cd4 panoramiX: XineramaGetImageData(): simplify the loop
take way the extra scope / indention on the `if (nbox)` statement and
use `continue` instead.

Hint: for easier review, one can use `git diff -w` in order to suppress
the indention-only changes.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 12:12:33 +02:00
Enrico Weigelt, metux IT consult
03928dea4b panoramiX: don't use FOR_NSCREENS_FORWARD_SKIP() anymore
in preparation of upcoming new iterator macros, phase out
FOR_NSCREENS_FORWARD_SKIP, so we don't need an additional macro
for just the case where first screen is skipped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 12:10:27 +02:00
Enrico Weigelt, metux IT consult
69452c23ae panoramiX: XineramaGetImageData(): replace walk variable i by walkScreenIdx
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
e4081afa65 panoramiX: XineramaGetImageData(): add walkScreen temp variable
Instead of always accessing the global screens array, do it only once
and put it into a walk variable.

Also prepration for upcoming commits which are moving the looping logic
into a generic macro.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
be425a933c panoramiX: XineramaGetImageData(): scope scratchMem
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
1193e294e7 panoramiX: XineramaGetImageData(): scope sizeNeeded variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
03f3388745 panoramiX: XineramaGetImageData(): declarare and init depth in one shot
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
124dee2db0 panoramiX: XineramaGetImageData(): scope ScratchPitch variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
79b6f60277 panoramiX: XineramaGetImageData(): scope pBox
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00