Commit Graph

22444 Commits

Author SHA1 Message Date
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
8336ad8e6f xfixes: 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:03 +02:00
Enrico Weigelt, metux IT consult
bdaa1f7a69 render: untwist Xinerama - call orig functions directly
When a xinerama-enabled handler is calling into the plain one, there's
no need to go through extra call table - we can call them directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 09:56:51 +02:00
Enrico Weigelt, metux IT consult
9449df5896 glx: __glXSendReply(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 09:48:56 +02:00
Enrico Weigelt, metux IT consult
9feb398a7c config: fix inttype mismatches on device major/minor numbers
System headers define them as unsigned.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 20:31:59 +02:00
Enrico Weigelt, metux IT consult
8ac6a39c7f xkb: move WriteToClient() calls on Events into DIX macro
WriteToClient() shouldn't be called directly anymore, unless there's
no other way.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 20:25:02 +02:00
Varad Dixit
2a4a36aa58 fix minor spelling mistake in contributing guidelines 2025-09-05 15:05:37 +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
904acca6c8 .github: win32: fix pulling libxcb-render-util and libxcb-keysyms
Their latest releases have still configured wrong submodule URLs,
so we need to use master here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 13:49:45 +02:00
Enrico Weigelt, metux IT consult
110830b4de dbe: use canonical screen iterator index variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:49:38 +02:00
Enrico Weigelt, metux IT consult
1b91049083 kdrive: KdCursorOffScreen(): canonical screen iterator index
in preparation of upcoming generic screen iterator macros, already
rename the index variable to what the macro will be using.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:49:26 +02:00
Enrico Weigelt, metux IT consult
ef46dec08d render: ProcRenderAddGlyphs(): move locally used variables into local scope
make the variable's it easier to understand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:49:15 +02:00
Enrico Weigelt, metux IT consult
e268101b64 dix: 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-05 08:48:42 +02:00
Enrico Weigelt, metux IT consult
4d66d6f9ac xfree86: dga: ProcXDGAQueryModes(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:48:29 +02:00
Enrico Weigelt, metux IT consult
9678c60ad1 dix: deprecate GetFontPath()
The function isn't used anymore, but still part of SDK/ABI. And it shouldn't
be used by drivers, ever. Marking it as deprecated now, so we can remove it later.

(it's also not present in recent proprietary NVidia drivers, btw)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:44:49 +02:00
Enrico Weigelt, metux IT consult
a7811ea424 dix: ProcGetFontPath(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:44:49 +02:00
Enrico Weigelt, metux IT consult
d734b75a37 dix: ProcAllocColorPlanes(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:44:38 +02:00
Enrico Weigelt, metux IT consult
0ca53c6908 dix: ProcAllocColorCells(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:44:27 +02:00
Enrico Weigelt, metux IT consult
59e74c0a1b dix: ProcGetAtomName(): use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:44:15 +02:00
Enrico Weigelt, metux IT consult
40473404e4 mi: miDCDeviceCleanup(): little loop simplification
skip cycle via `continue` instead of having a big if{} block.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 19:13:14 +02:00
Enrico Weigelt, metux IT consult
c339338277 glx: replace __GLX_SWAP_INT() by swapl()
We have an optimized function for this, so use it.
2025-09-04 18:33:24 +02:00
Enrico Weigelt, metux IT consult
d438dfc677 mi: tiny cosmetic cleanup in miDCDeviceCleanup()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 17:33:36 +02:00
Enrico Weigelt, metux IT consult
f32d06a101 dix: drop obsolete SGenericReply()
Not used anywhere, neither exported, so no need to keep it around
any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 17:23:16 +02:00
Enrico Weigelt, metux IT consult
09cecbf724 glx: consolidate retrieval of vendor for screen
Move the steps for retrieving the vendor object for given screen
into a little helper function.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 14:07:17 +02:00
Enrico Weigelt, metux IT consult
5ca776aaba test: misc: turn set_screen() macro into an inline function
* a bit more type-safe and cleaner to read
* cache the screen pointer on cache
* preparation for upcoming refactoring of screen array access

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 12:00:22 +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
a574ab57b2 glx: replace __GLX_SWAP_INT_ARRAY() by SwapLongs()
We have an optimized function for this, so use it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:49:02 +02:00
Enrico Weigelt, metux IT consult
3cdb1c3266 dri3: proc_dri3_get_supported_modifiers(): use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:47:04 +02:00
Enrico Weigelt, metux IT consult
ac4408b929 Xvmc: add reply byte-swapping
In 22 years, nobody ever implemented byte-swapping here.

Fixes: 9508a382f8
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:39:31 +02:00
Enrico Weigelt, metux IT consult
f6bd4ab3d3 dix: drop obsolete CopySwap16Write()
Not used anywhere, neither exported, so no need to keep it
around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:39:16 +02:00
Enrico Weigelt, metux IT consult
edc5cfa711 mi: simplify miDCDeviceCleanup()
Return out earlier and scope the index variable.
Also a preparation for upcoming screen walk macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:22:39 +02:00
Enrico Weigelt, metux IT consult
553f13fdca xfree86: dri: ProcXF86DRIGetDrawableInfo(): cache screen pointer
Cache the screen pointer in local variable, instead of fetching it
from global array several times. Follow-up commits will use some
inline helper for that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:22:23 +02:00
Enrico Weigelt, metux IT consult
f00f20aa8e Xi: ProcXCloseDevice(): compactify the loop a bit
In preparation of upcoming screen iterator macros, compactify the
loop body a little bit. This function is so cold that it's not
really worth caching the screen's root window pointer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:08:19 +02:00
Enrico Weigelt, metux IT consult
ad0895ff0d dbe: DbeExtensionInit() don't reuse walk variable differently
The code is easier to understand when we don't reuse existing variables
for entirely different things.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:08:06 +02:00
Enrico Weigelt, metux IT consult
f23a668f76 dbe: DbeResetProc(): locally scope temporary variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:07:54 +02:00
Enrico Weigelt, metux IT consult
7c114a30bc dix: XineramaConstrainCursor(): assign and declara variables in one shot
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:07:44 +02:00
Enrico Weigelt, metux IT consult
06af052eb7 Xi: SendEventToAllWindows(): drop unneeded local variable
Only used once as paramter, so we can use its assigned value directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:07:32 +02:00
Enrico Weigelt, metux IT consult
975436f535 dix: rpcbuf: _X_EXPORT x_rpcbuf_write_CARD8s() for internal use
_X_EXPORT'ing x_rpcbuf_write_CARD8s() just for internal use (eg. glx),
it's *NOT* supposed to be called by any external modules/drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:10:23 +02:00
Enrico Weigelt, metux IT consult
21976fe20d render: SetPictureFilter() declare and assign pScreenFilter in one shot
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:06:57 +02:00
Enrico Weigelt, metux IT consult
1c65d0949e glx: xorgGlxServerInit(): canonical screen iterator index
in preparation of upcoming generic screen iterator macros, already
rename the index variable to what the macro will be using.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:06:45 +02:00
Enrico Weigelt, metux IT consult
b8bfb5792a kdrive: KdCursorOffScreen(): move dx and dy into local scope
These are just used locally and always assigned at loop body start,
so it's cleaner to declare them locally inside the loop body.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:06:33 +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
0d152c44f0 dix: ProcListExtensions(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 10:41:38 +02:00
Enrico Weigelt, metux IT consult
8cfcb072d2 dix: ProcListHosts(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 10:22:12 +02:00
Enrico Weigelt, metux IT consult
15340ce053 dix: ProcQueryColors(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 10:22:00 +02:00
Enrico Weigelt, metux IT consult
a41114cbe7 dix: ProcListInstalledColormaps(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 17:12:11 +02:00
Enrico Weigelt, metux IT consult
e2d9dc4054 kdrive: fix KdCursorOffScreen()
Bug slipped through: we have to substract the coordinates from the walked
screen to the current one, instead of the walked one from itself :o

Fixes: 97d72431cf
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 17:12:54 +02:00
Enrico Weigelt, metux IT consult
c3df0f0ed5 dix: DoGetImage(): use x_rpcbuf_t
Use x_rpcbuf_t for payload assembly and X_SEND_REPLY_WITH_RPCBUF()
for sending it all out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 15:11:26 +02:00