Commit Graph

22312 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
01768051cf xwin: drop wrapping on ScreenRec->CloseScreen()
Instead of complicated wrapping, just call fbCloseScreen() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:33:13 +01:00
Enrico Weigelt, metux IT consult
a0c67bd720 xquartz: drop obsolete _mesa_free() and _mesa_malloc()
These macros are always defined to free() and malloc(), so we don't
really need them, instead can use those functions directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:30:47 +01:00
Enrico Weigelt, metux IT consult
eb082584b6 os: utils: ‘VerifyDisplayName: fix array subscript signedness
../os/utils.c: In function ‘VerifyDisplayName’:
../os/utils.c:624:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  624 |         if (!isdigit(d[i])) {
      |                       ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:15:02 +01:00
Enrico Weigelt, metux IT consult
d7a3c8901e test: fix signess warning
> ../test/xi2/protocol-xiwarppointer.c:169:24: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
>     169 | request.dst_x = -1 << 16;
>         | ~~ ^
> ../test/xi2/protocol-xiwarppointer.c:182:24: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
>     182 | request.dst_y = -1 << 16;
>         | ~~ ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 20:14:39 +01:00
Enrico Weigelt, metux IT consult
fce17e9308 .github: *BSD: silence warning on duplicate typedef
>  In file included from ../glx/glxdricommon.c:35:
>  /usr/local/include/GL/internal/dri_interface.h:445:26: warning: redefinition of typedef 'GLsync' is a C11 feature [-Wtypedef-redefinition]
>    445 | typedef struct __GLsync *GLsync;
>        |                          ^
>  /usr/local/include/GL/glext.h:1367:26: note: previous definition is here
>   1367 | typedef struct __GLsync *GLsync;
>        |                          ^

Since it's coming from MESA, the only thing we can do here is
suppressing this warning explicitly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 16:31:36 +01:00
Enrico Weigelt, metux IT consult
6d41b43829 .github: switch dependencies to our new mirrors
Our new automatic mirrors have a special prefix, so we need to
fixup the URLs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 14:47:20 +01:00
Enrico Weigelt, metux IT consult
0a18956047 kdrive: ephyr: add noreturn attribute to ephyrProcessErrorEvent()
>  ../hw/kdrive/ephyr/ephyr.c:977:1: warning: function 'ephyrProcessErrorEvent' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
>    977 | {
>        | ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 14:34:16 +01:00
Enrico Weigelt, metux IT consult
f590b320cc xfree86: silence warnings on SYSCALL() macro
> ../hw/xfree86/os-support/shared/posix_tty.c:366:38: warning: while loop has empty body [-Wempty-body]
>    366 |     SYSCALL(r = read(fd, buf, count));
>        |                                      ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 14:33:53 +01:00
Enrico Weigelt, metux IT consult
7b15c8a9b4 xext: xvdisp: fix printf format
> ../Xext/xvdisp.c: In function ‘ProcXvListImageFormats’:
> ../Xext/xvdisp.c:1017:81: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
>  1017 |         LogMessage(X_WARNING, "ProcXvListImageFormats() payload_len mismatch: %ld but shoud be %d\n",
>       |                                                                               ~~^
>       |                                                                                 |
>       |                                                                                 long int
>       |                                                                               %d
>  1018 |                    rpcbuf.wpos, (pPort->pAdaptor->nImages*sz_xvImageFormatInfo));
>       |                    ~~~~~~~~~~~
>       |                          |
>       |                          size_t {aka unsigned int}

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-11 10:28:49 +01:00
Enrico Weigelt, metux IT consult
ceeabba033 .github: nightly purge of old pipelines from certain branches
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 20:06:00 +01:00
Enrico Weigelt, metux IT consult
980385e2ec xext: namespace: fix printf format string
../Xext/namespace/hook-init-rootwindow.c: In function ‘hookInitRootWindow’:
../Xext/namespace/hook-init-rootwindow.c:38:21: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID’ {aka ‘long unsigned int’} [-Wformat=]
   38 |             XNS_LOG("<%s> actual root 0x%0" PRIx32 "\n", walk->name, walk->rootWindow->drawable.id);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                |
      |                                                                                                XID {aka long unsigned int}
../Xext/namespace/namespace.h:71:50: note: in definition of macro ‘XNS_LOG’
   71 | #define XNS_LOG(...) do { printf("XNS "); printf(__VA_ARGS__); } while (0)
      |                                                  ^~~~~~~~~~~
../Xext/namespace/hook-init-rootwindow.c:38:43: note: format string is defined here
   38 |             XNS_LOG("<%s> actual root 0x%0" PRIx32 "\n", walk->name, walk->rootWindow->drawable.id);
      |                                         ~~^
      |                                           |
      |                                           unsigned int
      |                                         %0lx
../Xext/namespace/hook-init-rootwindow.c:70:17: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID’ {aka ‘long unsigned int’} [-Wformat=]
   70 |         XNS_LOG("<%s> virtual root 0x%0" PRIx32 "\n", walk->name, walk->rootWindow->drawable.id);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                             |
      |                                                                                             XID {aka long unsigned int}
../Xext/namespace/namespace.h:71:50: note: in definition of macro ‘XNS_LOG’
   71 | #define XNS_LOG(...) do { printf("XNS "); printf(__VA_ARGS__); } while (0)
      |                                                  ^~~~~~~~~~~
../Xext/namespace/hook-init-rootwindow.c:70:40: note: format string is defined here
   70 |         XNS_LOG("<%s> virtual root 0x%0" PRIx32 "\n", walk->name, walk->rootWindow->drawable.id);
      |                                      ~~^
      |                                        |
      |                                        unsigned int
      |                                      %0lx

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 19:58:21 +01:00
Enrico Weigelt, metux IT consult
4895dec748 .github: use our own mirrors instead of freedesktop.org
Since gitlab.freedesktop.org isn't very reliable, better use our
own mirrors instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 19:55:35 +01:00
Enrico Weigelt, metux IT consult
bc5cb4e8f3 .github: move CI scripts from .gitlab-ci/ to .github/scripts
We're not using gitlab anymore (and the CI config there is totally
unmaintained), so better move the scripts to the right place.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 19:15:35 +01:00
Enrico Weigelt, metux IT consult
10b4f53c97 include: dix.h: declare clients[] array prototype without size
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 16:24:11 +01:00
Enrico Weigelt, metux IT consult
0b2a21722b .github: macos: split off own version of install-prereq.sh
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 16:23:53 +01:00
Enrico Weigelt, metux IT consult
d8afe67983 .github: fix artifact cache key on mingw32
We're not calling install-prereq.sh, so no need to have it's
hash in the cache key.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 15:46:32 +01:00
Enrico Weigelt, metux IT consult
f4b90697ce xfree86: fix include of xf86VGAarbiter_priv.h
Needs to be included also in non-pciaccess case, so the dummy
functions are declared.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 15:24:08 +01:00
Enrico Weigelt, metux IT consult
01777ec8dd xfree86: fix xf86VGAarbiterWrapFunctions() definition in non-libpciaccess case
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 15:24:08 +01:00
Enrico Weigelt, metux IT consult
df0f1cc687 os: Xtranssock: fix printf format warning
> ../os/Xtranssock.c: In function '_XSERVTransSocketReopen':
> ../os/Xtranssock.c:449:49: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
>         prmsg (1, "SocketReopen: invalid portlen %d\n", portlen);
>                                                  ~^     ~~~~~~~
>                                                  %ld

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 15:11:27 +01:00
Enrico Weigelt, metux IT consult
19f015d8e6 os.h: fix _X_ATTRIBUTE_VPRINTF() macro on MacOS and FreeBSD
their compiler doesn't seem to support gnu_printf attribute.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-10 15:02:00 +01:00
Oleh Nykyforchyn
ae689438dc xfree86/modesetting: prevent modesetting driver from
grabbing claimed slots

This patch makes modesetting driver use the return value of the extended
xf86ClaimFbSlot to prevent crashes.

Fixes: https://github.com/X11Libre/xserver/issues/1505
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-10 15:00:31 +01:00
Oleh Nykyforchyn
9307a252c9 xfree86/common: introduce generic xf86CheckSlot() function
This function will be used by xf86Claim{Fb,Pci,Platform}Slot()
to prevent them from claiming already used slots.

Fixes: https://github.com/X11Libre/xserver/issues/1505
Fixes: d3fd8c385b
Fixes: d09b3dae3e
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-10 15:00:31 +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