Commit Graph

21553 Commits

Author SHA1 Message Date
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
Enrico Weigelt, metux IT consult
7193bd9fab os: osdep.h: workaround for win32 define CreateWindow
We need to undef this win32 symbol, otherwise it's conflicting with our
`CreateWindow` fields.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 14:14:13 +02:00
sesankm
0e43e8c2aa xkb: xkb.c: refactor to use c99 style declarations
Signed-off-by: sesankm <26676400+sesankm@users.noreply.github.com>
2025-09-03 13:33:40 +02:00
Enrico Weigelt, metux IT consult
61f9234ee8 dix: rpcbuf: _X_EXPORT some functions for internal use
_X_EXPORT'ing some x_rpcbuf_clear() and x_rpcbuf_write_CARD8s() just for
internal use (eg. glx) - those are *NOT* supposed to be called by any
external modules/drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 11:20:59 +02:00
Enrico Weigelt, metux IT consult
d47357e6c9 Xi: inline SProcXGetDeviceControl()
move the only one relevant line into ProcXGetDeviceControl()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 10:10:48 +02:00
Enrico Weigelt, metux IT consult
8d82699acf xfixes: 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-03 10:09:48 +02:00
Enrico Weigelt, metux IT consult
ddee0a9397 Xext: saver: inline SProcScreenSaverQueryInfo()
The only actually effective line can be easily moved into
ProcScreenSaverQueryInfo()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 10:04:16 +02:00
Enrico Weigelt, metux IT consult
75d4cb0eeb Xext: dpms: inline the SProc's
The few instructions for byte-swapping are trivial enought to be inlined
into the actual request handlers, so we can reduce a lot of boilerplate.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 10:04:05 +02:00
Enrico Weigelt, metux IT consult
f288745d49 treewide: write xXineramaScreenInfo via x_rpcbuf_write_rect()
The xXineramaScreenInfo payload type has the same definition as xRectangle,
so we can just use x_rpcbuf_write_rect() for those.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:34:00 +02:00
Enrico Weigelt, metux IT consult
fe9fcfe98f render: ProcRenderQueryPictFormats(): 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-03 09:33:41 +02:00
Enrico Weigelt, metux IT consult
60dc405def render: ProcRenderQueryPictFormats(): scope pFormat variable
instead of reusing one variable for different things, put it into local
scopes, so things can't ever get mixed up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:33:41 +02:00
Enrico Weigelt, metux IT consult
8237dacffe render: ProcRenderQueryPictFormats(): don't re-use counter variables
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:33:41 +02:00
Enrico Weigelt, metux IT consult
638822b19e render: 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-03 09:33:29 +02:00
Enrico Weigelt, metux IT consult
31e7112138 randr: 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-03 09:33:18 +02:00
Enrico Weigelt, metux IT consult
3be2aeba4a pseudoramiX: 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-03 09:33:07 +02:00
Enrico Weigelt, metux IT consult
99a776119c present: 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-03 09:32:55 +02:00
Enrico Weigelt, metux IT consult
44228d264a glx: replace __GLX_SWAP_SHORT() by swaps()
We have an optimized function for this, so use it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:32:38 +02:00
Enrico Weigelt, metux IT consult
cca0a47af7 dri3: proc_dri3_buffers_from_pixmap(): 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 09:31:56 +02:00
Enrico Weigelt, metux IT consult
065f8d4d75 dix: unexport internal QueryFont() function
This function is internal to DIX (used for assembling XQueryFont replies
and not used by any drivers (not even proprietary NVidia), and really
shouldn't ever called by them at all. It's been one the many victims of a
really unthoughtful mass export back 17 years ago.

That'S a necessary step for refactoring the RPC reply mechanics.

Since it's never used by any driver at all, we can easily to this change
within the current ABI level.

Fixes: d6cbd4511e
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:31:44 +02:00
Enrico Weigelt, metux IT consult
2aec9a0b73 dix: rpcbuf: add x_rpcbuf_write_CARD64() and x_rpcbuf_write_CARD64s()
Add functions for writing (and byte-swapping) CARD64 values.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:31:30 +02:00
Enrico Weigelt, metux IT consult
7655ee2631 dix: drop unused CopySwap32Write()
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-03 09:29:35 +02:00
Enrico Weigelt, metux IT consult
3107056193 dix: doListFontsWithInfo(): inline SwapFonts() call
As preparation for moving doListFontsWithInfo() (and it's callers) to
x_rpcbuf_t, inline the SwapFonts() call into the caller function.

SwapFonts() has several problems, eg. directly operating on a buffer that's
holding xQueryFontReply struct (which isn't the correct one, just happens to
match) as well as the whole payload.

We first need to get them out of the way, before we can split off the reply
into the (statically declared) header struct and the (x_rpcbuf_t-filled)
payload.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:29:17 +02:00
Enrico Weigelt, metux IT consult
4ca0274f3e dix: cursor: NULL check in ScreenRec->UnrealizeCursor calls
just for being cautious.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:28:58 +02:00
Enrico Weigelt, metux IT consult
8c8cbdd236 dbe: locally scope variables and declare when needed
Use locally scoped variables where possible, and declare variables
where they're needed - instead of all on the top of functions.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:27:30 +02:00
Enrico Weigelt, metux IT consult
fb07c595b4 damageext: 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-03 09:27:09 +02:00
Enrico Weigelt, metux IT consult
dcb5bb08ca composite: 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-03 09:26:47 +02:00
Enrico Weigelt, metux IT consult
b4ff756a48 dri3: replace tabs by spaces
Trivial tiny formatting cleanup.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 17:33:35 +02:00
Enrico Weigelt, metux IT consult
aa4fb3584c .github: tidy-up-auto: keep less minimum runs
reduce the number of minimum runs to be left to 2.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 15:03:23 +02:00
Enrico Weigelt, metux IT consult
17827b4667 .github: ubuntu: drop xtrans dependency
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 13:33:36 +02:00
Enrico Weigelt, metux IT consult
015fd1c4ee xquartz: dri: use X_SEND_REPLY_SIMPLE() for simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 12:51:58 +02:00
Enrico Weigelt, metux IT consult
7dcd9c7b1e xkb: xkbEvents: use static struct initialization
Instead of memset()ing all the structs and then assigning (overwriting)
invidual fields one by one, use static init and let the compiler find out
on its own how to do it the best way.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 12:51:43 +02:00
Enrico Weigelt, metux IT consult
a389034c2d xfree86: dga: ProcXDGAOpenFramebuffer() use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 12:49:29 +02:00
Enrico Weigelt, metux IT consult
f8ad69698a treewide return code of X_SEND_REPLY_WITH_RPCBUF()
The macro will automatically return BadAlloc if the buffer is broken,
otherwise Success. Thus, we don't need extra prior rpcbuf check.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 12:48:50 +02:00
Enrico Weigelt, metux IT consult
56cd66d147 render: ProcRenderQueryPictIndexValues(): 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-02 11:09:32 +02:00
Enrico Weigelt, metux IT consult
81f93d19a0 render: ProcRenderQueryFilters(): 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-02 11:08:32 +02:00
Enrico Weigelt, metux IT consult
26a1e5f709 randr: rrGetScreenResources(): use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 11:07:43 +02:00
Enrico Weigelt, metux IT consult
cbc4e91f02 randr: rrGetMultiScreenResources(): use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 11:07:28 +02:00
Enrico Weigelt, metux IT consult
e9f9391b1d randr: ProcRRXineramaIsActive(): use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 11:07:17 +02:00
Enrico Weigelt, metux IT consult
25e71fcb2a randr: ProcRRQueryProviderProperty(): use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 11:07:06 +02:00
Enrico Weigelt, metux IT consult
41506c8fae randr: ProcRRListProviderProperties(): use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 11:06:54 +02:00
Enrico Weigelt, metux IT consult
86755b09be randr: ProcRRGetScreenInfo(): use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 11:06:41 +02:00
Enrico Weigelt, metux IT consult
d0e24582a0 randr: ProcRRGetProviders(): 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-02 11:06:27 +02:00