Commit Graph

21612 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
eb17b34362 Xinerama: lambda-esque macro for walking Xinerama screens
Move the walking loops on Xinerama screens into lambda-esque macros:
the callers look quite like we've been using lambda functions and
closures, but actually are just fancy macro trickery.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-09 14:12:40 +02:00
Enrico Weigelt, metux IT consult
e3d9f4c3ef xfree86: dga: use canonical loop index in DGAClientStateChange()
Naming all index variables on looping over screens `walkScreenIdx`,
in order to make transition to upcoming generic screen walk macros easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-09 10:01:18 +02:00
stefan11111
7d48a9a41e modesetting: Fix memory leak
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-09 09:46:05 +02:00
sesankm
4c71d77d08 glx: glxcmds.c: use x_rpcbuf_t in DoQueryContext
Signed-off-by: sesankm <26676400+sesankm@users.noreply.github.com>
2025-09-09 09:44:49 +02:00
Enrico Weigelt, metux IT consult
f58b56a79f Xext: dpms: use return value of X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 19:25:24 +02:00
Enrico Weigelt, metux IT consult
f598186c0d Xext: 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-08 17:40:42 +02:00
Enrico Weigelt, metux IT consult
b97378b3b5 Xext: security: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 17:40:23 +02:00
Enrico Weigelt, metux IT consult
025227a113 glx: __glXDisp_RenderMode(): 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 17:40:01 +02:00
b-aaz
8d4c9270ea xf86AutoConfig: Enabled autoselction of the scfb driver for DragonFlyBSD.
scfb driver is the native frame-buffer driver used on both FreeBSD and DragonFlyBSD,
It was not enabled as a fallback on DragonFlyBSD, so enabled it.

The driver:
https://github.com/rayddteam/xf86-video-scfb
Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-09-08 17:39:48 +02:00
stefan11111
6415fdf2db kdrive: bring back Xfbdev
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-08 17:35:36 +02:00
b-aaz
99bc9e7800 Fixed the check for __builtin_popcountl for old compilers.
Old compilers used on some platforms (e.g. DragonFlyBSD) do not support __has_builtin, so now we fall back to #if define if __has_builtin is not found.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-09-08 17:29:45 +02:00
sesankm
af8b69b710 xkb: XKBMisc: scoped declaration in loops and use int instead of register ints
Signed-off-by: sesankm <26676400+sesankm@users.noreply.github.com>
2025-09-08 17:28:13 +02:00
sesankm
e3ae087bc7 xkb: XKBMisc: simple refactoring to declare variables where needed in XkbKeyTypesForCoreSymbols
Signed-off-by: sesankm <26676400+sesankm@users.noreply.github.com>
2025-09-08 17:28:13 +02:00
Enrico Weigelt, metux IT consult
49ddc8b3ec Xext: shape: 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 10:20:56 +02:00
Enrico Weigelt, metux IT consult
e3122e411c xfree86: dga: simplify DGAClientStateChange()
Simply do the action on matched screen inside the loop instead of
saving the found client and acting on it later (if found).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 09:59:11 +02:00
Enrico Weigelt, metux IT consult
93d1a2681f dix: enterleave: split out big looped code into separate functions
* make the code easier to read
* preparation for moving the looping into lambda-esque macros
  (the code inside the loops doesn't compile in here, but does when
  moved to separate functions)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 09:58:58 +02:00
Enrico Weigelt, metux IT consult
638f8e16ac dix: PrintWindowTree(): move locally-used variabes into local scope
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-08 09:58:47 +02:00
Enrico Weigelt, metux IT consult
7f4bef0174 Xext: GE: 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:58:35 +02:00
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