Commit Graph

21506 Commits

Author SHA1 Message Date
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
Enrico Weigelt, metux IT consult
36ef6a448b randr: ProcRRGetProviderInfo(): use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-02 11:06:05 +02:00
Enrico Weigelt, metux IT consult
9f8a9f4f8c xfree86: dga: use X_SEND_REPLY_SIMPLE() for simple replies
Use the X_SEND_REPLY_SIMPLE() macro for simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-01 16:56:57 +02:00
Enrico Weigelt, metux IT consult
ea3ef55be1 dix: dixfonts: doListFontsWithInfo(): use X_SEND_REPLY_SIMPLE()
Use X_SEND_REPLY_SIMPLE() for writing out the trivial empty reply.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-01 15:28:05 +02:00
Enrico Weigelt, metux IT consult
46b4154517 dix: dixfonts: doListFontsAndAliases(): use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly and send it out via
X_SEND_REPLY_WITH_RPCBUF() macro.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-01 15:27:41 +02:00
Enrico Weigelt, metux IT consult
d04c60276a dix: devices: ProcGetMotionEvents(): 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-01 15:27:21 +02:00
Enrico Weigelt, metux IT consult
48cb1118ee treewide: drop unnecessary pixmap field initialization
The PixmapRec is already calloc()'ed, so no need for additional zero-writes
into individual fields. This also removes some unncessary #ifdefs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-01 13:31:52 +02:00
Enrico Weigelt, metux IT consult
89b900063e xfree86: DGA: remove obsolete comment
Forgotten to remove an obsolete comment when ancient DGA-1.0 was removed.

Fixes: 4615067264
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-01 12:49:54 +02:00
Enrico Weigelt, metux IT consult
fbc8463e84 os: xtrans: silence printf format warning on prmsg() call
size_t is unsigned, but might have different sizes depending on CPU arch,
so casting it to unsigned long, so we can safely use %ld.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-01 11:43:45 +02:00
Enrico Weigelt, metux IT consult
4615067264 xfree86: dga: drop support for old DGA 1.0 protocol
This is a relic from the 90s, giving really unsafe direct framebuffer
acccess. The very few known clients ever using this already been ported
to DGA 2.0 decades ago. The code is heavily tied to 32 bit architectures
anyways, so unlikely to even work on non-acient hardware.

So, without any clients left, there's no need to keep, let alone (try to)
repair that old cruft.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-01 11:13:48 +02:00
stefan11111
d806890aae Xext: fix comments when assembling xXF86VidModeModeInfo reply
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-09-01 11:13:13 +02:00
Enrico Weigelt, metux IT consult
2044c1506a xwin: use X_SEND_REPLY_SIMPLE() for simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-01 10:53:11 +02:00
Enrico Weigelt, metux IT consult
065efcb5d9 Xext: xres: use x_rpcbuf_t
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 16:11:06 +02:00
Enrico Weigelt, metux IT consult
34a27eacce Xi: ProcXIQueryPointer(): use x_rpcbuf_t
use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 16:10:06 +02:00
Enrico Weigelt, metux IT consult
6efd1a85e8 Xi: ProcXIAllowEvents(): untwist request header handling
The Xi protocol has some pretty unclean design aspect: instead of adding a
new sub-request type, version 2.2 introduced a different request structure
with some extra fields. So depending on which version the client has selected,
we need to operate on separate structs.

In the current implementation, there's a unclean hack by using the extended
structure and only accessing the extra fields when using v2.2 or above.
Even though this works, it's making the code unnecessarily complicated and
blocking the use if canonical request parsing macros (which are coming with
subsequent commits).

Thus, it's time to clean it up and only use the exactly correct structs
in the two different cases. The trick is just branching by version and pick
out the the interesting values from the corresponding structs, so they can
later be used in the (mostly) version independent part.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 16:09:10 +02:00
Enrico Weigelt, metux IT consult
8c90875c3d Xi: ProcXListInputDevices(): use x_rpcbuf_t
use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 16:04:18 +02:00
Enrico Weigelt, metux IT consult
6ba9edc2b8 Xext: selinux: use x_rpcbuf_t for reply assembly
Use x_rpcbuf_t and associated macros for assembling and sending replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 16:03:17 +02:00
Enrico Weigelt, metux IT consult
ae4912f837 dix: drop obsolete Swap32Write()
Not used anywhere, neither exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:55:40 +02:00
Enrico Weigelt, metux IT consult
c9ac063793 os: xtrans: rename Writev() methods to Write()
The Writev() methods essentially became Write() now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
449327f68f os: xtrans: drop own struct iovec definition on win32
We don't need our own `struct iovec` definition on win32/mingw anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
3c5caa1ba0 os: xtrans: drop old Write() methods
Since everything's running via Writev() methods now, the now unused Write()
methods can all be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
a52ac4fb26 os: xtrans: replace _XSERVTransWriteV()
Now that all WriteV() methods are operating on single buffer instead ofiovec's,
we don't need the complicated _XSERVTransWriteV() anymore, but instead can
write directly to the socket/fd.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
c079ad54fb os: xtrans: let Writev() methods accept just one buffer instead of iovec
Since they're only called with a one-element iovec, we can use a single
buffer pointer straight away, thus making it quite the same as the old
Write() methods.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
a905a3921b os: xtrans: _XSERVTransWriteV(): call ciptr->transptr->Write() directly
_XSERVTransWrite() is only intended as frontend, for xtrans consumers to
call in here. And upcoming commits will change that function to call the
Writev() method instead of Write(), so we would end up in infinite
recursing if we'd still it it here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
b738a28098 os: xtrans: simplify _XSERVTransWriteV()
Refactor _XSERVTransWriteV() to call write() on Unix and instead drop
the WRITEV() macro.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
e46f51cee9 os: xtrans: drop now obsolete _XSERVTransWritev()
_XSERVTransWritev() isn't used anymore, so no need to keep it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:51:33 +02:00
Enrico Weigelt, metux IT consult
6372a1e28a present: use X_SEND_REPLY_SIMPLE()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:32:33 +02:00
Enrico Weigelt, metux IT consult
353c77f3df xfixes: use X_SEND_REPLY_SIMPLE() for simple replies
Use the X_SEND_REPLY_SIMPLE() macro for sending out simple replies.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:32:04 +02:00
Enrico Weigelt, metux IT consult
6e2d5d3ddf render: use X_SEND_REPLY_SIMPLE() for simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:26:59 +02:00
Enrico Weigelt, metux IT consult
91e04e4ec6 record: use X_SEND_REPLY_SIMPLE() for simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:21:36 +02:00
Enrico Weigelt, metux IT consult
5ea2496d20 treewide: clean up static zero initialization
Do it the ISO C way.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:21:16 +02:00
Enrico Weigelt, metux IT consult
331510cc8f randr: use X_SEND_REPLY_SIMPLE() for sending simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:19:23 +02:00
Enrico Weigelt, metux IT consult
4aff0544ea dix: screen_hooks: drop extra ; on DECLARE_SCREEN_HOOK()
This isn't allowed by C standard, so getting warnings using -pedantic.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:18:39 +02:00
Enrico Weigelt, metux IT consult
286a15de4c xfree86: dri: use X_SEND_REPLY_SIMPLE() for simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:17:06 +02:00
Enrico Weigelt, metux IT consult
a27f18d1c6 Xi: ProcXGetDeviceControl() also use x_rpcbuf_t for byte-swapping
Use x_rpcbuf_t also for writing individual fields and so let it also
do the byte-swapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:16:18 +02:00
Enrico Weigelt, metux IT consult
72083eb117 glamor: don't use anonymous structs and unions in glamor_composite_shader
Anonymous structs and unions are a GNUism, violating C standard, thus
better not using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:14:48 +02:00
Enrico Weigelt, metux IT consult
54d430f893 pseudoramiX: use X_SEND_REPLY_SIMPLE() for sending simple replies
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 14:14:21 +02:00
Enrico Weigelt, metux IT consult
e223abb80e Xi: ProcXISelectEvents() declare variables where needed
For better readability, declare the variables only where they're used,
and try to scope them, instead of declaring them all on the very top.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 10:04:27 +02:00
Enrico Weigelt, metux IT consult
37ebc7d74b treewide: explicitly cast %p printf parameters to void*
Do it the ISO C way, so -pendantic is shouting a little bit less.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 10:03:34 +02:00
stefan11111
65a7f1d6a1 kdrive: add build system bits for kdrive input drivers
They are all disabled for now, build options for enabling them
will be added when Xfbdev is added.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-31 10:02:32 +02:00
stefan11111
dcc29cce96 kdrive: small C cleanups we missed
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-31 10:02:32 +02:00
stefan11111
133bf69eb5 meson.build: add Xephyr to the list of X servers we mention at build time
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-31 10:02:32 +02:00
Enrico Weigelt, metux IT consult
c4b492b36d xkb: ProcXkbGetDeviceInfo(): use x_rpcbuf_t for reply payload assembly
At this point just use it as allocator, so we can use the
X_SEND_REPLY_WITH_RPCBUF() macro for final sending.

Follow-up commits will change the whole call stack to operate on
x_rpcbuf_t directly, so it's also doing the byte-swap for us.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 10:00:40 +02:00
Enrico Weigelt, metux IT consult
4160338f3a dix: devices: use x_rpcbuf_t for payload assembly
Use x_rpcbuf_t for reply payload assembly, so we can uniformly use the
X_SEND_REPLY_WITH_RPCBUF() macro for final write out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 09:59:36 +02:00
Enrico Weigelt, metux IT consult
d6cd58e04c fb: fix unused function fbInitializeDrawable()
>  ../fb/fbpixmap.c:32:20: warning: unused function 'fbInitializeDrawable' [-Wunused-function]
>      32 | static inline void fbInitializeDrawable(DrawablePtr pDrawable) {}

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 19:05:15 +02:00
Enrico Weigelt, metux IT consult
2a5bca08ef xfree86: x86emu: drop assert() on uninitialized variable
If assert()s actually enabled, we're having undefined behaviour.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 19:02:40 +02:00
Enrico Weigelt, metux IT consult
c3e83fa555 include: os.h: fix extra ;
Fix pedantic warnings:

> ../include/os.h:144:71: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
>   144 | XNFalloc(unsigned long /*amount */ ) __attribute__((returns_nonnull));;

> ../include/os.h:158:76: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
>   158 | XNFcallocarray(size_t nmemb, size_t size) __attribute__((returns_nonnull));;

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 15:52:49 +02:00
Enrico Weigelt, metux IT consult
cb0ab6ae0b Xi: ProcXIPassiveGrabDevice(): move rpcbuf declaration upwards
The code below the `out` label is using the rpcbuf variable, but we have
a jump site before the variable is declared. It had been overlooked, because
for yet unknown reasons the compiler doesn't complain at all about this.
We could assume that it at least moves the stack allocation upwards
(always could even happen even on function entry), but we don't know whether
the memory is already unitialized.

So, to be on safe-side, move the declaration upwards, before the first
jump site.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 14:32:39 +02:00