Commit Graph

19511 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
e07571c94a (submit/cleanup-xv-dispatch) Xext: xv: 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.

It's also much cleaner to use the defines from proto headers instead of
raw numbers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
33bdc388dd (submit/cleanup-xv-dispatch) Xext: xv: untwist Xinerama handling
The current way of switching between Xinerama and single-screen handlers
is quite complicated and needs call vector tables that are changed on
the fly, which in turn makes dispatching more complicated.

Reworking this into a simple and straight code flow, where individual request
procs just look at a flag to decide whether to call the Xinerama or single
screen version.

This isn't just much easier to understand (and debug), but also removes the need
or the call vectors, thus allowing further simplification of the dispatcher.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
bf67814c07 (submit/cleanup-xv-dispatch) Xext: xv: use static struct initialization on declaration
A little bit of code simplification by using static initialization
of struct right at the point of declaration. Also dropping a few now
unneccessary zero assignments.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
be839826c5 (1855) include/resource.sh: drop unused INVALID define
Nowhere used, so no need to keep it around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
f9fe2c48a4 (1859) dix: make LEGAL_NEW_RESOURCE() macro private
Not used by any external driver, so no need to keep it in public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
426647d2c5 ci: update driver versions
Lots of drivers have received changes that might also be API related.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
40f0117e3b ci: upgrade libdrm to 2.4.121
Needed for newer version of amdgpu driver.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
11cfed4764 (1861) dix: make DDXTouchPointInfoRec private
This type isn't used by any external drivers, so no need to
keep it in public API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
ebe1c45fe0 (1866) dix: use calloc() in _dixAllocateScreenObjectWithPrivates()
We're clearing the whole object size anyways, so we can directly
use calloc() instead of malloc() plus memset().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
966a0f05ac (1867) dix: unexport and rename CreateWindow()
a) an internal function that's not used by any drivers
b) conflicting with function/define of same name on win32

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
b136b30caf (1871) damage: fix resource access flag on destroy
When destroying a resource, the lookup needs to be done with
DixDestroyAccess (instead of DixWriteAccess) flag - otherwise
xace hooks can't properly differenciate what's happening.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Fixes: 6c46645cfc
2026-02-02 17:35:11 +01:00
Enrico Weigelt, metux IT consult
c2b2aa23da (1880) Xi: use fixed define for extenion base opcode
Several places outside Xi (eg. dix, security hooks, ...) need to know the
actual XI base opcode. This formerly had been done by a global variable,
which is filled on XI init. This has some drawbacks, eg. requires that
XI really is initialized before anybody else attempting to access this
variable - changes in extension init order could be dangerous.

Since extension opcodes are now (compile-time) fixed for all known
extensions (including XI), this isn't needed anymore. We can really
rely on the XI extension always having the same opcode base. So we
can drop that variable entirely and use the corresponding define instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:35:10 +01:00
Enrico Weigelt, metux IT consult
a62fb50814 (1880) dix: reserve fixed extension opcodes for known extensions
Assign fixed opcodes for known (in-tree) extensions and add
defines for them. Other places (eg. security extensions) that
need to know those opcodes now can directly use those defines
not having to look them up at runtime.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
7518b08b59 (1880) dix: add support for reserved extension slots
In order to allow extensions being registered at fixed opcodes,
there need to be a reserved slot range. Thus `NumExtensions` needs
to start out with the upper ceiling of the reserved slot space.
Thus it cannot tell whether the array already had been allocated,
and some slots now may be NULL, so we need some extra checks.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
3e4006f731 (1880) dix: AddExtension: simplify error return path
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
0c309b0222 (1880) dix: simplify extension query
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
f4a915d53e (1881) Xace: remove remains of XACE_CORE_DISPATCH
There's no actual caller of this hook - removed almost a decade ago
(see commit 6cb34816af), but some remains
had been forgotten to clean up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
49c325cbe2 (1882) xwin: drop unused variable WindowsDRIReqCode
This variable is assigned once, but never used.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
aa2407c375 (1883) Xquartz: drop unused variable DRIReqCode
This variable is assigned once, but never used.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
a2aac0959b (1884) xfree86: dri: drop unused variable DRIReqCode
This variable is assigned once, but never used.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
336d1c869a (1886) XI: drop now obsolete SReplyIDispatch()
nothing else to do for it anymore, since all previous callers now have been
migrated to do the byte-swapping directly, so it can be dropped entirely.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
4504d72c19 (1886) XI: directly write out X_XIGetFocus reply
Write out the X_XIGetFocus reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
bce05a414b (1886) XI: directly write out X_XIGetSelectedEvents reply
Write out the X_XIGetSelectedEvents reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
eac41de08a (1886) XI: directly write out X_XIGetProperty reply
Write out the X_XIGetProperty reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
1d6cd3444d (1886) XI: directly write out X_XIListProperties reply
Write out the X_XIListProperties reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
8f1ba9d0bb (1886) XI: directly write out X_XIPassiveGrabDevice reply
Write out the X_XIPassiveGrabDevice reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
28469a043b (1886) XI: directly write out X_XIGrabDevice reply
Write out the X_XIGrabDevice reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
1f9547e8d2 (1886) XI: directly write out X_XIQueryDevice reply
Write out the X_XIQueryDevice  reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
e35d6aacde (1886) XI: directly write out X_XIQueryVersion reply
Write out the X_XIQueryVersion reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
375ed176f2 (1886) XI: directly write out X_XIGetClientPointer reply
Write out the X_XIGetClientPointer reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
6bf3bed6af (1886) XI: directly write out X_XIQueryPointer reply
Write out the X_XIQueryPointer reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
25f7b3cb3a (1886) XI: directly write out X_GetDeviceProperty reply
Write out the X_GetDeviceProperty reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
b5a887f407 (1886) XI: directly write out X_ListDeviceProperties reply
Write out the X_ListDeviceProperties reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
1f92ceaeb0 (1886) XI: directly write out X_ChangeDeviceControl reply
Write out the X_ChangeDeviceControl reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
e79e5f967c (1886) XI: directly write out X_GetDeviceControl reply
Write out the X_GetDeviceControl reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
94e8fcfde6 (1886) XI: directly write out X_SetDeviceValuators reply
Write out the X_SetDeviceValuators reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
761f738a57 (1886) XI: directly write out X_QueryDeviceState reply
Write out the X_QueryDeviceState reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
8518a0adbb (1886) XI: directly write out X_SetDeviceButtonMapping reply
Write out the X_SetDeviceButtonMapping reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
d0ad6aaecd (1886) XI: directly write out X_GetDeviceButtonMapping reply
Write out the X_GetDeviceButtonMapping reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
e5c69da66c (1886) XI: directly write out X_SetDeviceModifierMapping reply
Write out X_SetDeviceModifierMapping the reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
f2c315a613 (1886) XI: directly write out X_GetDeviceModifierMapping reply
Write out X_GetDeviceModifierMapping the reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
d1f8651108 (1886) XI: directly write out X_GetDeviceKeyMapping reply
Write out X_GetDeviceKeyMapping the reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
4472c9c148 (1886) XI: directly write out X_GetFeedbackControl reply
Write out X_GetFeedbackControl the reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
124ed300a9 (1886) XI: directly write out X_GetDeviceFocus reply
Write out X_GetDeviceFocus the reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
efe5cea41d (1886) XI: directly write out X_GrabDevice reply
Write out X_GrabDevice the reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:35 +01:00
Enrico Weigelt, metux IT consult
cbadadb44f (1886) XI: directly write out X_GetDeviceMotionEvents reply
Write out X_GetDeviceMotionEvents the reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:34 +01:00
Enrico Weigelt, metux IT consult
de56e7b2fb (1886) Xi: declare variables where needed in ProcXGetDeviceMotionEvents()
Improve code readability by moving variable declarations to where
they're actually needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:34 +01:00
Enrico Weigelt, metux IT consult
71fa198409 (1886) XI: drop extra temp variable in ProcXGetDeviceMotionEvents()
The value is only checked once, so no need to copy it to a temporary
variable first.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:34 +01:00
Enrico Weigelt, metux IT consult
60bdce6cc8 (1886) XI: use SwapLongs() in ProcXGetDeviceMotionEvents()
We already have a standard function for swapping 32 bit ints,
so let's use this one instead of rolling our own loop.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:34 +01:00
Enrico Weigelt, metux IT consult
36a11a8c53 (1886) XI: directly write out X_GetDeviceDontPropagateList reply
Write out X_GetDeviceDontPropagateList the reply directly (and do the swapping
within the request handler) instead of going through separate callback
that's having demux the replies again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-02 17:33:34 +01:00