Commit Graph

21254 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
d4fc1506ad dix: let CreateDefaultStipple() accept ScreenPtr instead of screen id
It's only caller already has the ScreenPtr, so it doesn't make any sense
passing in the screen number and let that function retrieve the pointer
on its own again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-12 11:09:35 +02:00
Enrico Weigelt, metux IT consult
a18524fa5d Xext: shape: fix non-ximerama build
In the non-XINERAMA code path, a parameter was missing.

Fixes: a57db845bb
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-12 11:10:53 +02:00
Enrico Weigelt, metux IT consult
a1c3dcb527 dix: let x_rpcbuf_wsize_units() return CARD32
Practically all callers need to assign to a CARD32 field, so let it
directly compute and return as CARD32.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-12 10:29:01 +02:00
Enrico Weigelt, metux IT consult
d19cfbfa70 randr: ProcRRGetOutputInfo (): simplify by using x_rpcbuf_t
* use x_rpcbuf_t for reply payload assembly and byte-swap
* do byte-swap of header fields explicitly instead of cryptic functions
* drop extra length computation

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:28:45 +02:00
Enrico Weigelt, metux IT consult
946eb68ff3 xkb: ProcXGetDeviceKeyMapping(): use x_rpcbuf_t
Using x_rpcbuf_t for payload assembly and byte swapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
Enrico Weigelt, metux IT consult
7d8d609121 xkb: ProcXkbGetMap(): add payload_len sanity check
Print out a warning when actually written payload length doesn't mactch
the previously computed one.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
Enrico Weigelt, metux IT consult
c3052dbc39 xkb: use x_rpcbuf_t in XkbWriteVirtualModMap()
As it's caller now has x_rpcbuf, we can use it here, instead of
meddling with pre-allocated buffer space directly via raw pointer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
Enrico Weigelt, metux IT consult
18fe21fe0e xkb: use x_rpcbuf_t in XkbWriteModifierMap()
As it's caller now has x_rpcbuf, we can use it here, instead of
meddling with pre-allocated buffer space directly via raw pointer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
Enrico Weigelt, metux IT consult
e5d91b49e5 xkb: use x_rpcbuf_t in XkbWriteExplicit()
As it's caller now has x_rpcbuf, we can use it here, instead of
meddling with pre-allocated buffer space directly via raw pointer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
Enrico Weigelt, metux IT consult
15a13ef93e xkb: XkbAssembleMap(): use x_rpcbuf_t for writing the virtual mods
As we now have x_rpcbuf, we can use it here, instead of meddling
with pre-allocated buffer space directly via raw pointer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
Enrico Weigelt, metux IT consult
316e5e431a xkb: use x_rpcbuf_t in XkbWriteKeyBehaviors()
As it's caller now has x_rpcbuf, we can use it here, instead of
meddling with pre-allocated buffer space directly via raw pointer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
Enrico Weigelt, metux IT consult
bee50daeca xkb: use x_rpcbuf_t in XkbWriteKeyActions()
As it's caller now has x_rpcbuf, we can use it here, instead of
meddling with pre-allocated buffer space directly via raw pointer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
Enrico Weigelt, metux IT consult
264ecee69b xkb: use x_rpcbuf_t in XkbWriteKeySyms()
As it's caller now has x_rpcbuf_t, we can use it here, instead of
meddling with pre-allocated buffer space directly via raw pointer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
Enrico Weigelt, metux IT consult
742443ea73 xkb: pass x_rpcbuf_t into XkbAssembleMap()
The keymap assembly machinery is a horribly complicated machinery,
because often whole replies with variable sized payloads can be nested
into each other. It's time to use x_rpcbuf_t for that, but's is not an
easy thing to do and really a huge change - therefore doing this in small
and easy to digest step.

At first, let XkbAssembleMap() operate on a x_rpcbuf_t. But for now just
let it use the x_rpcbuf_t's raw buffer directly (because it's callees cant
work on this yet) - thus XkbAssembleMap() yet need to make enough room
in the buffer before calling in.

For the time being we're allocating far too much (because calculating
the actually need amount would be too complicated here) and having an
extra memcpy(). But it's just an intermediate step anyways - subsequent
commits will convert everything down the whole call chain into using
x_rpcbuf_t operations, so that extra overhead can be dropped again later.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00
callmetango
b59b6226d7 xfree86: enable semantic versioning
* switch major version from 25.0 to 25
* make loader respect legacy 25.0 module dirs (to be removed in version
  26)

Fixes: #646
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-08-11 20:25:52 +02:00
Enrico Weigelt, metux IT consult
f66ee7277e treewide: replace PICT_yuv2 by PIXMAN_yuy2
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
dbe4339fd7 treewide: replace PICT_a4b4g4r4 by PIXMAN_a4b4g4r4
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
5d96eba31b treewide: replace PICT_x4b4g4r4 by PIXMAN_x4b4g4r4
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
c2a4f0033c treewide: replace PICT_a4r4g4b4 by PIXMAN_a4r4g4b4
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
4295cf6817 treewide: replace PICT_x4r4g4b4 by PIXMAN_x4r4g4b4
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
840a4ceabe treewide: replace PICT_a1r5g5b5 by PIXMAN_a1r5g5b5
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
889ded74be treewide: replace PICT_a1b5g5r5 by PIXMAN_a1b5g5r5
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
a23fdf9d2f treewide: replace PICT_x1b5g5r5 by PIXMAN_x1b5g5r5
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
19df33aa7a treewide: replace PICT_b5g6r5 by PIXMAN_b5g6r5
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
cadf94d6c8 treewide: replace PICT_a2b10g10r10 by PIXMAN_a2b10g10r10
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
1687c9a20f treewide: replace PICT_a2r10g10b10 by PIXMAN_a2r10g10b10
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
ca7e24d2a7 treewide: replace PICT_a8b8g8r8 by PIXMAN_a8b8g8r8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
fea686a1fc treewide: replace PICT_x8b8g8r8 by PIXMAN_x8b8g8r8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
522a2d4280 treewide: replace PICT_x2r10g10b10 by PIXMAN_x2r10g10b10
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
aba79cbfca treewide: replace PICT_x2b10g10r10 by PIXMAN_x2b10g10r10
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
8cb07602ff treewide: replace PICT_x1r5g5b5 by PIXMAN_x1r5g5b5
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
4ce30fdb6b treewide: replace PICT_a8 by PIXMAN_a8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
c113bc77ae treewide: replace PICT_a1 by PIXMAN_a1
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
b736739892 treewide: replace PICT_r5g6b5 by PIXMAN_r5g6b5
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
3786a77ed3 treewide: replace PICT_b8g8r8x8 by PIXMAN_b8g8r8x8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
7939ec278d treewide: replace PICT_b8g8r8a8 by PIXMAN_b8g8r8a8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
314540a597 treewide: replace PICT_x8r8g8b8 by PIXMAN_x8r8g8b8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
79cda3dce3 treewide: replace PICT_r8g8b8 by PIXMAN_r8g8b8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
35a43252ca treewide: replace PICT_a8r8g8b8 by PIXMAN_a8r8g8b8
Try not to use old compat macros anymore, use the real ones instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:43 +02:00
Enrico Weigelt, metux IT consult
6b17a3bfbb randr: ProcRRQueryOutputProperty(): simplify by using x_rpcbuf_t
* use x_rpcbuf_t for reply payload assembly and byte-swap
* do byte-swap of header fields explicitly instead of cryptic functions
* drop extra length computation

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:23:24 +02:00
Enrico Weigelt, metux IT consult
16ab5a1456 randr: ProcRRListOutputProperties(): simplify by using x_rpcbuf_t
* use x_rpcbuf_t for reply payload assembly and byte-swap
* do byte-swap of header fields explicitly instead of cryptic functions
* drop extra length computation

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:20:17 +02:00
Enrico Weigelt, metux IT consult
e93b54bcea randr: ProcRRGetMonitors(): simplify by using x_rpcbuf_t
* use x_rpcbuf_t for reply payload assembly and byte-swap
* do byte-swap of header fields explicitly instead of cryptic functions
* drop extra length computation

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:14:35 +02:00
Enrico Weigelt, metux IT consult
26c2df04e9 os: use size_t as iov length parameter xtrans writev{,v}
struct msghdr is using size_t as for iov_length, so match up with it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:14:04 +02:00
stefan11111
81770d7315 os: use ssize_t in xtrans write{,v}
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-11 20:14:04 +02:00
Enrico Weigelt, metux IT consult
8d2860fd35 include: regionstr.h: fix int type mismatch in RegionNumRects() and RegionSize()
Fix compiler warnings by explicit type casts.

In this case, we know that those values can't be bigger than int can take,
neither become negative.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:13:01 +02:00
Enrico Weigelt, metux IT consult
35c075e2c4 dix: WriteRpcbufToClient(): fix int type mismatches
Use explicit cast to match WriteToClient()'s expectation and
return ssize_t, as coming from WriteToClient()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:11:09 +02:00
Enrico Weigelt, metux IT consult
f03042a2b7 dix: fix int mismatches related to MakeAtom()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:05:57 +02:00
Enrico Weigelt, metux IT consult
e006550e29 dbe: fix screen cleanup
The 2nd loop is supposed to free the privates and also clear the pointer
to them. But it instead of clearing the walk'ed pointer, it only clears
the one in the last screen left from the upper loop.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 15:27:14 +02:00
Enrico Weigelt, metux IT consult
566f961fd4 dix: fix int-type mismatches related to dixClientIdForXID()
The client index (in the client table) can never be negative, thus
make it an unsigned short.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 13:02:14 +02:00
Enrico Weigelt, metux IT consult
0fb490d536 Xext: saver: drop duplicate ScreenPtr retrival in SendScreenSaverNotify()
If we've already got the ScreenPtr, there's no need to retrieve it again
via the screen number, which we're getting via the ScreenPtr that we've
already got.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 13:01:54 +02:00