Enrico Weigelt, metux IT consult
1534692c98
Xext: panoramiX: PanoramiXGetImage() reply payload in one block
...
Simplify writing reply payload into just one block.
This also makes further simplifications by subsequent patches easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:07 +02:00
Enrico Weigelt, metux IT consult
9d40106aaa
dbe: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:07 +02:00
Enrico Weigelt, metux IT consult
62d48e1720
Xext: panoramiX: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
4a0a6e963d
Xext: panoramiX: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
d93666575e
Xext: xvmc: enable swapped requests
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
fe5b9f0a73
Xext: xvmc: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
f4c75bd036
Xext: xvmc: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
a5df5f98fa
Xext: xv: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
41926b5ee7
Xext: xv: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
f53d96df93
Xext: xtest: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
3354adaded
Xext: xtest: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
6021d051ae
Xext: selinux: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
ad3bc82bd2
Xext: selinux: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
959ab004c7
Xext: xres: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
91ae0db303
Xext: xres: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
726e65229d
Xext: xf86bigfont: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
8a65a468c0
Xext: xf86bigfont: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
03080acc50
Xext: xcmisc: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
2bc853336e
Xext: xcmisc: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
d7e8d32e4d
Xext: vidmode: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
68d931a320
Xext: vidmode: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
04d39c0751
Xext: sync: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
456e9a79c7
Xext: sync: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
0e2a369c5b
Xext: security: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
b3da276bc0
Xext: security: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
0548236e1d
Xext: geext: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
155bb3064a
Xext: geext: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
f0ac7e7b44
Xext: shm: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
ef8ade4c81
Xext: shm: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
e913998fc2
Xext: bigreq: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
efb6c40451
Xext: bigreq: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
83d49cf053
Xext: shape: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
a1f10d8f63
Xext: shape: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
109da9a188
Xext: saver: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
16a1db38ac
Xext: saver: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
0f414d50dd
Xext: dpms: use REPLY_*() macros for preparing / sending replies
...
Use the new macros for preparing and sending replies to clients.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
6f9e1286fe
Xext: dpms: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
...
Use the new macros to make request struct parsing / field swapping
much easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
616b4bafc1
Xext: panoramiX: ProcXineramaQueryScreens(): reply payload in one block
...
Simplify writing reply payload into just one block.
This also makes further simplifications by subsequent patches easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
2a650889d6
Xext: selinux: use static reply struct init on declaration
...
Make the code a bit easier to read by using initialization of the reply
structs, at the point of declaration. Most of them aren't written to later,
just passed into WriteReplyToClient(). Also dropping some useless zero
assignments (struct initializers automatically zero-out unmentioned fields).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
7053fce89f
Xext: selinux: allocate reply buffer on stack
...
Simplify reply buffer in SELinuxSendItemsToClient() by putting it on stack.
No need to go through heap and free it later, if the compiler can do all
the work for us.
This also allows further generalizations of reply sending code by upcoming
commits.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
f2aeb1eb8e
(submit/xext-saver) Xext: saver: consolidate (non-)xinerama versions
...
We can make it a bit simpler by doing the request header
checking only once.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
96029bd8b2
(submit/xext-saver) Xext: saver: use explicit switch/case for dispatching
...
It's more robust / easier understandable programming style to use explicit
switch statements, case'ing on the constants defined in the protocol header,
instead of implicitly via a some opaque call table. It's also done this
way in the other extensions, so making the code a bit more consistent.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
7d259d9762
(submit/xext-saver) Xext: saver: skip unneeded zero init and zero-swapping
...
When using struct initializers, all fields not set explicitly are zero.
Also no need to swap fields that are known to be zero.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
43a5706003
(submit/xext-saver) Xext: saver: fix missing swap in QueryVersion reply
...
The `majorVersion` and `minorVersion` fields are CARD16, thus need to be swapped.
OTOH, the lengths field is zero anyways, so no need to swap it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
0679c2629e
(submit/cleanup-geext-dispatch) Xext: geext: simplify dispatcher
...
Most of the complexity here isn't needed at all. It can be really trivial,
since we just have one operation anyways.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
93671a5a46
(submit/cleanup-geext-dispatch) Xext: geext: drop unused variable extEntry
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
3ec10b866d
(submit/cleanup-shm-dispatch) Xext: shm: move client local check into procs
...
Move extra complexity out of the dispatch functions, so they're
really just switch/case statements calling the actual handler procs.
Preparation for further steps.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
35a140d06d
(submit/cleanup-shm-dispatch) Xext: shm: simplify dispatcher
...
These dispatcher functions are much more complex than they're usually are
(just switch/case statement). Bring them in line with the standard scheme
used in the Xserver, so further steps become easier.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
0b38a55fe4
(submit/cleanup-xv-dispatch) Xext: xv: ProcXvListImageFormats(): write reply payload at once.
...
Collect up the puzzle piezes of the reply payload into to a temporary struct,
so we can send it as one block. This allows for further simplifications by
subsequent commits.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00
Enrico Weigelt, metux IT consult
a84d6355d0
(submit/cleanup-xv-dispatch) Xext: xv: ProcXvQueryAdaptors(): write reply payload at once.
...
Collect up the puzzle piezes of the reply payload into to a temporary struct,
so we can send it as one block. This allows for further simplifications by
subsequent commits.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-08-29 11:35:06 +02:00