xserver/randr
Enrico Weigelt, metux IT consult 8b64458aa7 (!1794) randr: use explicit case statement instead of SProcRandrVector table
No need to go indirectly through a vector table, since everything's fixed
anyways. It's not a pretty robust programming style: any changes need great
care, in order to not mix up things.

Replacing this by direct switch/case statement, which is using the defines
from the xrandr protocol headers. Also adding a little bit more protection
against subtle programming errors and reducing cognitive load (source size)
on understanding the code by using a tiny macro for deducing define name and
function name from the request's name.

This approach actually uncovered some subtle bug that had been waiting in
the dark for over 15 years.

As collateral benefit, getting a tiny bit better performance.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-26 11:21:20 +02:00
..
meson.build meson: hide C API if Xorg is disabled (like autotools) 2021-03-11 00:22:36 +00:00
randr.c randr: use CloseScreen hook 2025-06-12 16:45:29 +02:00
randrstr.h randr: unexport and document RRXineramaExtensionInit() 2025-06-12 16:29:59 +02:00
randrstr_priv.h randr: unexport and document RRTransformCopy() 2025-06-12 16:30:10 +02:00
rrcrtc.c randr: use calloc() instead of malloc() 2025-06-12 16:49:37 +02:00
rrdispatch.c (!1794) randr: use explicit case statement instead of ProcRandrVector table 2025-06-26 11:21:20 +02:00
rrdispatch_priv.h randr: move remaining dispatch prototypes to rrdispatch.h 2025-06-12 16:27:20 +02:00
rrinfo.c randr: use calloc() instead of malloc() 2025-06-12 16:49:37 +02:00
rrlease.c randr: move remaining dispatch prototypes to rrdispatch.h 2025-06-12 16:27:20 +02:00
rrmode.c randr: use calloc() instead of malloc() 2025-06-12 16:49:37 +02:00
rrmonitor.c randr: use calloc() instead of malloc() 2025-06-12 16:49:37 +02:00
rroutput.c randr: use calloc() instead of malloc() 2025-06-12 16:49:37 +02:00
rrpointer.c randr: unexport and document RRCrtcGetScanoutSize() 2025-06-12 16:27:50 +02:00
rrproperty.c randr: use calloc() instead of malloc() 2025-06-12 16:49:37 +02:00
rrprovider.c randr: use calloc() instead of malloc() 2025-06-12 16:49:37 +02:00
rrproviderproperty.c randr: use calloc() instead of malloc() 2025-06-12 16:49:37 +02:00
rrscreen.c randr: use calloc() instead of malloc() 2025-06-12 16:49:37 +02:00
rrsdispatch.c (!1794) randr: use explicit case statement instead of SProcRandrVector table 2025-06-26 11:21:20 +02:00
rrtransform.c randr: unexport and document RRTransformInit() 2025-06-12 16:30:01 +02:00
rrtransform.h randr: unexport and document RRTransformCopy() 2025-06-12 16:30:10 +02:00
rrxinerama.c randr: use struct initializer for reply structs 2025-02-24 20:30:26 +00:00