Commit Graph

21183 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
1328254980 randr: ProcRRGetCrtcInfo(): use x_rpcbuf_t
Instead of using our own Use x_rpcbuf_t for assembling and
byte-swapping the reply payload.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 17:24:24 +02:00
Enrico Weigelt, metux IT consult
0de028016d os: osdep: drop WIN32 compat for uname()
Since nothing on WIN32 (mingw) targets is calling uname() anymore,
this compat code is now obsolete.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:57:43 +02:00
Enrico Weigelt, metux IT consult
7b1283268c os: access: use xhostname()
Simplify DefineSelf() by using xhostname(). Neither need to
care about OS specifics here, nor take care of zero-terminating the
hostname string - xhostname() is already doing this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:57:43 +02:00
Enrico Weigelt, metux IT consult
d5dda483cb os: xtrans: replace _XSERVTransGetHostname() by xhostname()
Now that we have the OS layer xhostname() wrapper, we don't need the
_XSERVTransGetHostname() function anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:57:43 +02:00
Enrico Weigelt, metux IT consult
ab08f9e0a2 os: utils:: use xhostname()
Simplify set_font_authorizations() by using xhostname(). Neither need to
care about OS specifics here, nor take care of zero-terminating the
hostname string - xhostname() is already doing this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:57:43 +02:00
Enrico Weigelt, metux IT consult
1bfd27e8f6 xfree86: parser: use xhostname()
Simplify DoSubstitution() by using xhostname(). Neither need to
care about OS specifics here, nor take care of zero-terminating the
hostname string - xhostname() is already doing this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:57:43 +02:00
Enrico Weigelt, metux IT consult
4d532adf7d vfb: use xhostname()
Simplify vfbWriteXWDFileHeader() by using xhostname(). Neither need to
care about OS specifics here, nor take care of zero-terminating the
hostname string - xhostname() is already doing this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:57:43 +02:00
Enrico Weigelt, metux IT consult
df0d09dcb2 os: xhostname: helper for gethostname()
This little helper does the OS specific part for gethostname()
calls. It's putting the result into a fixed-length struct and making
sure it's properly filled and the string is always zero-terminated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:57:43 +02:00
Enrico Weigelt, metux IT consult
e0748cf74e panoramiX: PanoramiXGetImage(): move down reply struct
Move down reply struct declaration/assignment and byte-swapping to
right before the write-out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:49:20 +02:00
Enrico Weigelt, metux IT consult
475d53fb58 panoramix: clean up PanoramiXTranslateCoords() variable declarations
* declare and assign in one shot
* move down reply struct declaration to where it's needed

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:49:20 +02:00
Enrico Weigelt, metux IT consult
aaea461c6f panoramiX: clean up reply struct definitions
* declare and assign them right where they're needed, in one shot
* drop unnecessary assignment and byte-swap of zero values

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 16:49:20 +02:00
Joseph Crowell
1744f34f83 xfree86: modesetting: meson: fix symbol test path 2025-08-07 16:48:50 +02:00
Enrico Weigelt, metux IT consult
cd4e80da8d treewide: replace PICT_TYPE_OTHER by PIXMAN_TYPE_OTHER
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-07 15:35:38 +02:00
Enrico Weigelt, metux IT consult
6948c15499 treewide: replace PICT_TYPE_GRAY by PIXMAN_TYPE_GRAY
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-07 15:35:38 +02:00
Enrico Weigelt, metux IT consult
d8a06a2f9f treewide: replace PICT_TYPE_COLOR by PIXMAN_TYPE_COLOR
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-07 15:35:38 +02:00
Enrico Weigelt, metux IT consult
9f4391203f treewide: replace PICT_TYPE_A by PIXMAN_TYPE_A
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-07 15:35:38 +02:00
Enrico Weigelt, metux IT consult
71e2b20fe0 treewide: replace PICT_TYPE_BGRA by PIXMAN_TYPE_BGRA
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-07 15:35:38 +02:00
Enrico Weigelt, metux IT consult
ba06904f10 treewide: replace PICT_TYPE_ABGR by PIXMAN_TYPE_ABGR
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-07 15:35:38 +02:00
Enrico Weigelt, metux IT consult
900c893246 treewide: replace PICT_TYPE_ARGB by PIXMAN_TYPE_ARGB
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-07 15:35:38 +02:00
Enrico Weigelt, metux IT consult
435de433cd os: io: fix NULL output buffer after FlushClient()
FlushClient() does drops the output buffer, when it becomes empty.
This previously wasn't any problem and actually intented, because we've
returned from the write path directly after FlushClient() was called.

But now we've changed the call order, so it's called from within
OutputBufferMakeRoom(), so we need to make sure we always got valid
output buffer before trying to access it.

For the future, we should think about whether dropping output buffers
really makes sense at all. Instead we could leave them as they are
(over the client's lifetime) and maybe just trim when they've went
too big.

Fixes: 1c13cfa6ca
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 14:00:25 +02:00
Enrico Weigelt, metux IT consult
600b46c7c1 treewide: replace PICT_FORMAT_B by PIXMAN_FORMAT_B
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-07 12:45:37 +02:00
Enrico Weigelt, metux IT consult
ca118c9793 treewide: replace PICT_FORMAT_G by PICT_FORMAT_G
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-07 12:45:37 +02:00
Enrico Weigelt, metux IT consult
414d5c7654 treewide: replace PICT_FORMAT_R by PIXMAN_FORMAT_R
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-07 12:45:37 +02:00
Enrico Weigelt, metux IT consult
f104c96091 treewide: replace PICT_FORMAT_COLOR by PIXMAN_FORMAT_COLOR
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-07 12:45:37 +02:00
Enrico Weigelt, metux IT consult
3cd02f4245 treewide: replace PICT_FORMAT_VIS by PIXMAN_FORMAT_VIS
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-07 12:45:37 +02:00
Enrico Weigelt, metux IT consult
803355e874 treewide: replace PICT_FORMAT_TYPE by PIXMAN_FORMAT_TYPE
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-07 12:45:37 +02:00
Enrico Weigelt, metux IT consult
c2c19fc7fe treewide: replace PICT_FORMAT_RGB by PIXMAN_FORMAT_RGB
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-07 12:45:37 +02:00
Enrico Weigelt, metux IT consult
7783ae7723 treewide: replace PICT_FORMAT_BPP by PIXMAN_FORMAT_BPP
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-07 12:45:37 +02:00
Enrico Weigelt, metux IT consult
ae1b649587 treewide: replace PICT_FORMAT_A by PIXMAN_FORMAT_A
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-07 12:45:37 +02:00
Enrico Weigelt, metux IT consult
97f3ff8c7e os: cross platform socket close() wrapper
Reducing the ifdef-zoo a bit by moving the platform specific socket
close calls into separate function. On win32, this also checks the
retval and potentially query for error. On Unix, just calling close().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 12:40:35 +02:00
Enrico Weigelt, metux IT consult
ec20354aec os: cross platform ioctl() wrapper
Reducing the ifdef-zoo a bit by moving the platform specific socket
ioctl calls into separate function. On win32, this also checks the
retval and potentially query for error. On Unix, just calling ioctl().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 12:40:35 +02:00
Enrico Weigelt, metux IT consult
fe795fa7b8 os: generic socket layer init function
Reduce the ifdef-zoo a bit by moving win32 specific socket layer init
into a separate function (that's no-op on non-win32).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 12:40:35 +02:00
Enrico Weigelt, metux IT consult
fdf43d4176 os: io: FlushClient() consolidate error/abort code path
remove some redundancy in the error path

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 12:36:20 +02:00
stefan11111
be7784fce2 kdrive: add fd notification machinery
This will be needed by Xfbdev's keyboard driver, which cannot work
with input threads yet.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 19:48:15 +02:00
Enrico Weigelt, metux IT consult
205c07979b kdrive: export some variables
Allow them to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
0eac1a0ce1 kdrive: export KdRingBell()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
50a5e0b8b4 kdrive: export KdSetLed()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
7213249f14 kdrive: export _KdEnqueuePointerEvent()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
9ce9eb9e42 kdrive: export KdScreenInit()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
0160aee88d kdrive: export KdSaveScreen()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
9c9aa173f1 kdrive: export KdCreateScreenResources()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
4d79e2e73d kdrive: export KdAllocatePrivates()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
d7dbd86045 kdrive: export KdParseRgba()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
cb4eec13ab kdrive: export KdParseKeyboard()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
e85363dfcc kdrive: export KdParsePointer()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
f4d455b684 kdrive: export KdDisableScreens()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
81fbad5115 kdrive: export KdInitScreen()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
2c91c8ad1d kdrive: export KdSetSuspend()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
d30b04499d kdrive: export KdSetColormap()
Allow it to be used by other places, eg. upcoming Xfbdev.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-06 16:20:36 +02:00
Enrico Weigelt, metux IT consult
325c403b5f render: picture: make PictFormatShort equal to pixman_format_code_t
Both types are already binary equal: both are enums using the same bit values,
but from compiler's perspective they're still different types, so it's warning.

>   ../glamor/glamor_trapezoid.c:123:47: warning: implicit conversion from
>   enumeration type 'PictFormatShort' (aka 'enum _PictFormatShort') to different
>   enumeration type 'pixman_format_code_t' [-Wenum-conversion]
>     123 |     image = pixman_image_create_bits(picture->format,
>          |             ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~^~~~~~
>    1 warning generated.

The PICT_* fields, values and macros are relics from pre-pixman days (pixman,
historically, essentially is the PICT_* stuff moved out to separate library)
This has been a practical way for doing the transition from the old internal
PICT_* code to pixman. Now it's time to finish it all up and drop the extra
glue layer.

In order to make it smooth, and also providing backwards compatibility for
drivers (until they all keep up), just aliasing the types and adding #define's
for the enum values.

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