Commit Graph

22208 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
34f1304c54 [PR #1612] include: dix.h: declare clients[] array prototype without size
PR: https://github.com/X11Libre/xserver/pull/1612
2025-12-10 15:06:26 +01:00
Enrico Weigelt, metux IT consult
03e2499ef9 HACK: 2do 2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
4b46c42356 [PR #1327] dix: add dixAnyOtherGrabbed() and unexport GrabInProgress
PR: https://github.com/X11Libre/xserver/pull/1327
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
a144427de0 [PR #1348] treewide: drop ifdef's for GLYPHPADBYTES != 4
PR: https://github.com/X11Libre/xserver/pull/1348
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
c80e290617 [PR #1350] xfree86: int10: use standard asprintf() instead of our own implementation
PR: https://github.com/X11Libre/xserver/pull/1350
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
1c004fee64 [PR #1351] xfree86: parser: use standard asprintf() instead of our own implementation
PR: https://github.com/X11Libre/xserver/pull/1351
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
10547f6f23 [PR #1352] xfree86: modes: replace XNFasprintf() by standard libc asprintf()
PR: https://github.com/X11Libre/xserver/pull/1352
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
46d1280263 [PR #1353] xfree86: common: replace XNFasprintf() by standard libc asprintf()
PR: https://github.com/X11Libre/xserver/pull/1353
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
e3d86ea9ed [PR #1355] os: make XNFvasprintf() static
PR: https://github.com/X11Libre/xserver/pull/1355
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
e9c8cb8f3f os: unexport SeatId and move it to dix settings
Not used by any external module/driver, so no need to keep it
public. Also move it to the new dix settings code and rename it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
3eb0e35f90 dix: unexport defaultColorVisualClass
Not used by any drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
92e88bf533 [PR #796] xkb: ProcXkbGetKbdByName(): extra payload size sanity check
PR: https://github.com/X11Libre/xserver/pull/796
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
b97125ff25 [PR #897] Xext: security: inline SProc*()'s
PR: https://github.com/X11Libre/xserver/pull/897
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
1c08fc8a9a [PR #1063] dix: use xorg_list saveSet list
PR: https://github.com/X11Libre/xserver/pull/1063
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
3e3e230167 [PR #1213] Xext: xres: ProcXResQueryClientIds() use x_rpcbuf_t
PR: https://github.com/X11Libre/xserver/pull/1213
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
3d0499f250 [PR #1358] dix: unexport defaultFontPath
PR: https://github.com/X11Libre/xserver/pull/1358
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
8037f00a33 [PR #1383] dix: unexport several extension related functions
PR: https://github.com/X11Libre/xserver/pull/1383
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
13a747e62c [PR #1594] xfree86: fix xf86VGAarbiterWrapFunctions() definition in non-libpciaccess case
PR: https://github.com/X11Libre/xserver/pull/1594
2025-12-10 14:55:13 +01:00
Enrico Weigelt, metux IT consult
90c8af27bd include: move writing xorg-config.h to the end
This allows us to move around probing DDX specific logic out of the fat
include/meson.build to more appropriate places, eg. xfree86/meson.build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 14:54:28 +01:00
Enrico Weigelt, metux IT consult
e097ea8a83 Xext: xf86bigfont: add missing include of os/osdep.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 14:53:52 +01:00
Enrico Weigelt, metux IT consult
9ddce7292d xfree86: doc: drop mentioning xf86MapPciMem()
This function has been removed decades ago.

Fixes: 46f55f5dea
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 12:47:30 +01:00
Enrico Weigelt, metux IT consult
6e560bf9c6 xfree86: doc: drop mentioning xf86GetPciVideoInfo()
This function had been removed back two decades ago, so it's time to update
documentation now.

Fixes: 46f55f5dea
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 12:47:23 +01:00
Enrico Weigelt, metux IT consult
b08b8d6256 namespace: hook-resource: fix printf formats
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 11:09:48 +01:00
Enrico Weigelt, metux IT consult
1c3b0da356 .github: build w/ -Werror on Ubuntu
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 21:06:57 +01:00
Enrico Weigelt, metux IT consult
25fff39056 xkb: fix printf() format warnings
> 6008 |             LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch mrep size (%ld // %ld units)\n",
>       |                                                                                                         ~~^
>       |                                                                                                           |
>       |                                                                                                           long int
>       |                                                                                                         %d
>  6009 |                        (unsigned long)childbuf.wpos, (unsigned long)mrep.length * 4, mrep.length);
>       |                                                                                      ~~~~~~~~~~~
>       |                                                                                          |
>       |                                                                                          CARD32 {aka unsigned int}

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 20:29:47 +01:00
Enrico Weigelt, metux IT consult
1786c8c406 test: simple-xinit: fix warning on unused result of write()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 20:01:44 +01:00
Enrico Weigelt, metux IT consult
84bfff6672 kdrive: fix missing include to ddx_priv.h
Fix missing prototype for OsVendorInit()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-09 19:51:11 +01:00
Alan Coopersmith
2be080c4e3 dix: set errorValue correctly when XID lookup fails in ChangeGCXIDs()
dixLookupResourceByType always overwrites the pointer passed in as the
first arg, so we shouldn't use the union it's in after that to get the
requested XID value to put in the errorValue.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1857
Fixes: 2d7eb4a19b ("Pre-validate ChangeGC XIDs.")
Reported-by: Mouse <mouse@Rodents-Montreal.ORG>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2111>
2025-12-09 17:41:25 +01:00
Enrico Weigelt, metux IT consult
408b3076a7 sdk: install xlibre-server.pc in addition to xorg-server.pc
A little step forward in completely separating our SDK from old
legacy Xorg.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-08 15:15:45 +01:00
stefan11111
58143b96fd modesetting: don't leak memory for the cursor plane if libdrm is too old
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-12-08 14:23:09 +01:00
stefan11111
5ade87efc7 modesetting: Use don't skip planes that are not on the current crtc
This breaks on some nvidia cards.

Fixes: ed49ae8fe7

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-12-08 14:23:09 +01:00
Enrico Weigelt, metux IT consult
609ea42a62 include: don't install client.h anymore
not included by any drivers, so doesn't need to be in SDK anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-05 19:44:59 +01:00
Enrico Weigelt, metux IT consult
800d37edcb xfree86: common: move enum ActionEvent to private header
Not needed by any driver - only use as parameter to xf86ProcessActionEvent(),
which already is private.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-05 12:30:46 +01:00
Tautvis
64326cc92e Patch 5/5 modesetting: try to get gpu device fd from seatd arbiter
The device node opening with seatd, like with systemd-logind can done during probe
(see get_drm_info in hw/xfree86/os-support/shared/drm_platform.c),
but in case of failure, the modesetting driver tries to open device
node directly (open_hw function in modesetting/driver.c).

This enchanes open_hw function to try use seatd arbiter for opening device node
in as last resort manner.

To make it functional seatd_libseat_open_graphics needs to have _X_EXPORT

Signed-off-by: tautvis <gtautvis gmail com>
2025-12-05 12:29:52 +01:00
Tautvis
10a8565465 Patch 4/5 xfree86: libseat support, wire-up support seatd-libseat.h into Xserver
Add necessary code into Xserver to support libseat (this time enabling
functionality).

Code used from Devuan repository + local changes to make functional in Xlibre

Co-Authored-By: Mark Hindley <mark@hindley.org.uk>
Co-Authored-By: Ralph Ronnquist <rrq@rrq.au>
Signed-off-By: Tautvis <gtautvis@gmail.com>
2025-12-05 12:29:52 +01:00
Tautvis
1ac940c01d Patch 3/5 os-support: add xf86VTKeepTtyIsSet
Add xf86VTKeepTtyIsSet function to export KeepTty state.

When seatd activates, it takes control of current vt (in global sense)!,
this code only activates sesion control code when XServer started
using same vt (for more context see c88a325899 commit ).

Signed-off-By: Tautvis <gtautvis@gmail.com>
2025-12-05 12:29:52 +01:00
Tautvis
8d90cd0060 Patch 2/5 xfree86: libseat support, wireup libseat
Refactor libseat code for Xlibre and add to meson.build:

* update meson for seat-libseat
* refactor code:
  * seatd-libseat.c - add aditional private include headers
  * add cast to libseat_set_log_handler argument 1 for (libseat_log_func),
  for warning silencing
  * make seatd_libseat_init to accept keeptty state as parameter
  * include xf86Events, xf86_priv - make visible xf86VTLeave for seatd code (it
    is neccesary because seatd can force console leave)

Signed-off-By: Tautvis <gtautvis@gmail.com>
2025-12-05 12:29:52 +01:00
Tautvis
6de8136907 Patch 1/5 xfree86: libseat support, the seatd-libseat.{c,h} code
This is initial patch for libseat. Technicaly almost verbatim code (with style changes)
from Devuan xorg server moved to os-support/shared directory as it can support other
oses than linux.

The original repository: https://git.devuan.org/devuan/xorg-server.git
The patch between fc24510f17e89a5bbac1065abab758a4d0c42634 and
6bf62381d0

Co-Authored-By: Mark Hindley <mark@hindley.org.uk>
Co-Authored-By: Ralph Ronnquist <rrq@rrq.au>
Signed-off-By: Tautvis <gtautvis@gmail.com>
2025-12-05 12:29:52 +01:00
Enrico Weigelt, metux IT consult
1c0a9399c8 meson.build: move creating conf_data object to toplevel
create it very early, so we're free to move around call sites
between subdirectories. preparation for untwisting the whole
probing logic.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-05 12:19:52 +01:00
Enrico Weigelt, metux IT consult
19ee44b607 treewide: drop including <dix-config.h> from private includes
All .c sources must include <dix-config.h> at the very first.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 19:50:44 +01:00
Enrico Weigelt, metux IT consult
220089822b test: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 17:41:15 +01:00
Enrico Weigelt, metux IT consult
d2e5ed2a89 Xi: drop SWAPIF macro
Trivial enough for just writing the actual code.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 17:29:17 +01:00
Enrico Weigelt, metux IT consult
f5a70d968c include: fix warning on XNFvasprintf() prototype
> ../os/xprintf.c: In function ‘XNFvasprintf’:
> ../os/xprintf.c:84:5: warning: function ‘XNFvasprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>    84 |     int size = vasprintf(ret, format, va);
>       |     ^~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 17:28:58 +01:00
Enrico Weigelt, metux IT consult
dbbbf14a83 Xi: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 16:28:54 +01:00
Enrico Weigelt, metux IT consult
36503b11b7 dix: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 16:28:06 +01:00
Enrico Weigelt, metux IT consult
6b189b7a22 xkb: fix printf argument size mismatch warning
> ../xkb/xkb.c:6008:106: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘CARD32’ {aka ‘long unsigned int’} [-Wformat=]
>  6008 |             LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch mrep size (%ld // %d units)\n",
>       |                                                                                                         ~^
>       |                                                                                                          |
>       |                                                                                                          int
>       |                                                                                                         %ld
>  6009 |                        (unsigned long)childbuf.wpos, (unsigned long)mrep.length * 4, mrep.length);
>       |                                                                                      ~~~~~~~~~~~
>       |                                                                                          |
>       |                                                                                          CARD32 {aka long unsigned int}
[...]

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 16:03:28 +01:00
Enrico Weigelt, metux IT consult
2e631d1454 xwin: fix compiler warning on potential buffer read overflow
> ../hw/xwin/InitOutput.c: In function ‘XwinExtensionInit’:
> ../hw/xwin/InitOutput.c:142:5: warning: ‘LoadExtensionList’ reading 12 bytes from a region of size 0 [-Wstringop-overread]
>   142 |     LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE);
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../hw/xwin/InitOutput.c:142:5: note: referencing argument 1 of type ‘const ExtensionModule[0]’
> In file included from ../include/extnsionst.h:53,
>                  from ../randr/randrstr.h:40,
>                  from ../hw/xwin/win.h:174,
>                  from ../hw/xwin/InitOutput.c:35:
> ../include/extension.h:100:23: note: in a call to function ‘LoadExtensionList’
>   100 | extern _X_EXPORT void LoadExtensionList(const ExtensionModule ext[],
>       |                       ^~~~~~~~~~~~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 15:10:51 +01:00
Enrico Weigelt, metux IT consult
71b25119f7 os: ResetHosts(): fix warning on potentially unitialized memory
> In function ‘ConvertAddr’,
>    inlined from ‘ResetHosts’ at ../os/access.c:1014:26:
> ../os/access.c:1540:25: warning: ‘saddr’ may be used uninitialized [-Wmaybe-uninitialized]
>  1540 |         if (16777343 == *(long *) &((struct sockaddr_in *) saddr)->sin_addr)
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../os/access.c: In function ‘ResetHosts’:
> ../os/access.c:908:7: note: ‘saddr’ declared here
>   908 |     } saddr;
>       |       ^~~~~

The union isn't needed at all, we're just using one of the fields anyways.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 15:10:43 +01:00
Enrico Weigelt, metux IT consult
beb15972d3 xwin: silence warning on missing prototype for OsVendorFatalError()
Just need to include ddx_priv.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 14:50:05 +01:00
Enrico Weigelt, metux IT consult
a2304300aa xwin: silence const char* assignment warnings
the target struct type defines char* fields, but we're sure they'll
never be written into, so just add typecast for silencing the warning.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 14:27:01 +01:00