Commit Graph

20892 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
44ec9b0e5b xwin: win.h: missing include of dix/dix_priv.h
Needed for dixAddAtom()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 12:09:39 +02:00
Enrico Weigelt, metux IT consult
d1ec096041 Xnamespace: fix printf patterns
For printing 32bit integers, we need to use PR*32 macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 12:09:31 +02:00
Enrico Weigelt, metux IT consult
0c33925ab0 kdrive: allow win32 build w/o sysv ipc
Win32 doesn't have SysV IPC, so we need to build it w/o this here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:55:09 +02:00
Enrico Weigelt, metux IT consult
b95741cbd5 README.md: update amdgpu driver version
update to xlibre-xf86-video-amdgpu-23.0.0.2

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:56:04 +02:00
Enrico Weigelt, metux IT consult
9124d0321a os: xprintf: fix includes
It's better coding style to include the header with prototypes for
our own functions directly, instead of relying on it being included
indirectly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:46:12 +02:00
Enrico Weigelt, metux IT consult
1e214abf9d xwin: fix unused variables in winSetShapeMultiWindow()
Fix warnings on unused variables.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:46:03 +02:00
Enrico Weigelt, metux IT consult
265adf240c .github: fix intel driver repo url
Should not have `.git` suffix.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:47:44 +02:00
Varad Dixit
d884b8aa94 Fix minor punctuation error in manual page
Change one occurence of 'comma separated' to 'comma-separated' in manual page
2025-08-05 11:47:10 +02:00
Enrico Weigelt, metux IT consult
5ff91a0c35 dix: inpututils: don't use %hhx printf pattern
mingw's printf() doesn't understand it yet, and it's not really
important here, so just use `%hx` instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:39:53 +02:00
Enrico Weigelt, metux IT consult
8e84c35431 dix: macro for checking X protocol types
The X protocol types from xorgproto all have corresponding sz_<typename>
defines with their actual network payload size (this can be checked via
SIZEOF() macro).

In theory, this should always be the same as sizeof(), but just to be sure,
adding a macro for a static assert on that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:38:53 +02:00
Enrico Weigelt, metux IT consult
96b0e59066 kdrive: ephyr: don't use %hhu in error messages
The win32/mingw libc doesn't support this conversion type.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:32:46 +02:00
Enrico Weigelt, metux IT consult
4c5a3a6f58 glamor: don't redefine ALIGN macro if it exists
On FreeBSD the ALIGN macro already exists in the standard headers,
so we sholdn't redefine it here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:17:06 +02:00
Enrico Weigelt, metux IT consult
2e0c442567 kdrive: ephyr: include glamor_priv.h only when glamor is enabled
Necessary for building on platforms without any GL at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:16:56 +02:00
Enrico Weigelt, metux IT consult
d14679ff29 kdrive: xephyr: link pthread on mingw for nanosleep()
For strange reaons, nanosleep() is in libpthread on mingw platform,
so we have to link it here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:16:47 +02:00
Joseph Crowell
73db0ed5d4 xfree86: drivers: common: remove incorrect #ifndef _XORG_CONFIG_H_
These functions are not defined anywhere else and are still necessary in the AMD drivers when using #include <xorg-config.h>
2025-08-05 11:16:34 +02:00
Enrico Weigelt, metux IT consult
6c7f39032f glx: fix duplicate typedef
../glx/indirect_table.c
  In file included from ../glx/indirect_table.c:28:
  In file included from ../glx/glxserver.h:66:
  ../include/glx_extinit.h:33:28: warning: redefinition of typedef '__GLXscreen' is a C11 feature [-Wtypedef-redefinition]
     33 | typedef struct __GLXscreen __GLXscreen;
        |                            ^
  ../glx/glxscreens.h:113:28: note: previous definition is here
    113 | typedef struct __GLXscreen __GLXscreen;
        |                            ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:15:56 +02:00
Enrico Weigelt, metux IT consult
b766775eb0 Xnamespace: fix possible memleak
In an OOM error path, we've forgotten an free() call.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 10:13:55 +02:00
Enrico Weigelt, metux IT consult
0102f4361f kdrive: ephyr: don't try to install handler for SIGUSR1 on win32
Windows has no Unix-type signals.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-01 17:18:12 +02:00
Enrico Weigelt, metux IT consult
b1393f59aa xfree86: fbdevhw: fix prototypes of fbdevhwstub
The prototypes between the stub functions and the real ones mismatched.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-01 17:07:42 +02:00
Enrico Weigelt, metux IT consult
46c5a87297 kdrive: don't include <err.h> anymore
We don't need it at all (and even shouldn't use it), and this breaks
the win32/mingw build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-01 17:01:01 +02:00
Enrico Weigelt, metux IT consult
bb1f1752bd kdrive: fix build on win32/mingw
Yet one more clash between <windows.h> and Xserver on `CreateWindow` symbol:
The windows header has a `#define CreateWindow CreateWindowA`, so we need
to #undef it everywhere we're using `CreateWindow` - until we've got that
ugly header out of the way completely.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-01 16:41:19 +02:00
Enrico Weigelt, metux IT consult
3765d8a7b9 bugfix release xlibre-xserver-25.0.0.7
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xserver-25.0.0.7
2025-07-29 16:48:05 +02:00
Oleh Nykyforchyn
c8df9c7689 xserver: os/log.c: ignore alternate forms in log formats
This patch fixes Xserver crashes when evdev or synaptics input drivers are used.
These (and maybe other) driver use alternate forms "%#..." in formats for
xf86IDrvLogVerb() function, which in turn uses signal-safe vpnprintf().
The last function does not recognize alternate forms and exits abnormally, which
causes Xserver to crash. The patch make vpnprintf() to ignore alternate forms.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-07-29 16:39:18 +02:00
stefan11111
cc7c0f2fdf config: fix build with -Dudev=false -Dudev_kms=true
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-29 10:47:06 +02:00
stefan11111
4b6e2aadff meson.build: Check for libudev directly, instead of our flimsy os-speciffic guessing
Implement what was discussed in X11Libre#478

Use dependency() instead of cc.check_header(), as the former is the
intended way to check for dependencies.

cc.check_headers would turn udev on on systems where libudev.h
is present, but libudev.pc isn't.

Thos would do the wrong thing on systems where the admin wants to
have that header for some reason, but doesn't want programs to use
libudev.

We also keep udev and udev_kms a tristate, so we try to do
the right thing when the user doesn't explicitly pass
values for udev and udev_kms.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-29 10:47:06 +02:00
stefan11111
19917e3e15 meson.build: Don't silently change the user's option regarding udev support
This can cause issues like: #397

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-29 10:47:06 +02:00
b-aaz
fa72f05928 meson.build: Enabled udev for FreeBSD.
FreeBSD uses libudev-devd for a libudev compatible interface.
So the udev options should be available for it.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
2025-07-29 10:47:06 +02:00
Enrico Weigelt, metux IT consult
f16745227a bugfix release xlibre-xserver-25.0.0.6
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xserver-25.0.0.6
2025-07-28 20:53:23 +02:00
Enrico Weigelt, metux IT consult
e60a1c4006 os: xdmcp: fix missing include of <X11/Xdmcp.h>
xdmcp.h is using types from <X11/Xdmcp.h>, but forgot to include it.
This just popped up with building w/ -Dxdmcp=false, because that file was
included in the wrong place (osdep.h) and only conditionally.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-28 16:21:02 +02:00
stefan11111
00d4d83059 glamor: Enable dma-buf on nvidia
Nvidia needs dma-buf for glamor acceleration to work
when using the modesetting ddx driver.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:36:16 +02:00
stefan11111
befa3227c6 glamor: Use EGL_LINUX_DMA_BUF_EXT to create GBM bo EGLImages
Port https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/751
to xlibre

Fixes glamor with modesetting on nvidia

This is needed for glamor to work with modesetting
on nvidia, according to the nvidia docs:
https://download.nvidia.com/XFree86/Linux-x86_64/510.39.01/README/gbm.html

From the mr above:

The X server was passing GBM bos directly to
eglCreateImageKHR using the EGL_NATIVE_PIXMAP_KHR
target. Given the EGL GBM platform spec claims it
is invalid to create a EGLSurface from a native
pixmap on the GBM platform, implying there is no
mapping between GBM objects and EGL's concept of
native pixmaps, this seems a bit questionable.

This change modifies the bo import function to
extract all the required data from the bo and then
imports it as a dma-buf instead when the dma-buf +
modifiers path is available.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-28 15:36:16 +02:00
Oleh Nykyforchyn
5d2315b6e6 mi: midispcur.c.: move miDCCloseScreen to post-hooks
This change is necessary to fix a segfault in intel driver at CloseScreen.
sna_early_close_screen() releases the cursor using FreeCursor(), which needs
miDCScreen private of pScreen. It has already been released by miDCCloseScreen(),
which is a pre-hook, and segfault occurs. Hence it is necessary to move
miDCCloseScreen() to post-hooks.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-07-23 11:12:09 +02:00
Oleh Nykyforchyn
5dc79405b5 render: picture.c.: move PictureScreenClose to post-hooks
This change is necessary to fix a segfault in intel driver at CloseScreen.
sna_early_close_screen() releases the glyph cache using FreePicture(), which needs
PictureScreen private of pScreen. It has already been released by PictureScreenClose(),
which is a pre-hook, and segfault occurs. Hence it is necessary to move
PictureScreenClose() to post-hooks.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-07-23 11:12:09 +02:00
Enrico Weigelt, metux IT consult
36125623fd modesetting: fix skipping on empty properties in drmmode_output_set_property()
We actually need to skip the entry if p->atoms is NULL.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 04:46:57 +02:00
Enrico Weigelt, metux IT consult
352fb8ad85 vidmode: fix ProcVidModeGetDotClocks() reply size computation
A clock entry is 32 bits instead of 8 bits long.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 01:59:17 +02:00
Enrico Weigelt, metux IT consult
90bfeca905 Xi: drop unused variable and NULL free in ProcXISelectEvents()
The `types` variable is never used, just assigned NULL - and that NULL
value is passed to free(). This code is really doing nothing, never did so
since introduced in 2009.

Fixes: 8b6a370058
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-14 20:26:57 +02:00
Enrico Weigelt, metux IT consult
c54d8b1b34 minor release 25.0.0.5
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xserver-25.0.0.5
2025-07-11 17:52:07 +02:00
Enrico Weigelt, metux IT consult
d6225de192 .gitlab: merge release into xserver-build workflow
Not neccessary to have entirely separate workflow for it - that's
just spamming the workflow list.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-11 17:35:46 +02:00
fish4terrisa-MSDSM
c754162a36 modesetting: ignore the drmmode if p->atoms is null
Some display drivers might cause p->atoms to be null if the display is
disabled. This will cause segfault when checking
if p->atoms[0] != property .
Some display drivers owned by qualcomm is known to cause this bug.

Signed-off-by: fish4terrisa-MSDSM <flyingfish.msdsm@gmail.com>
2025-07-11 17:14:07 +02:00
Enrico Weigelt, metux IT consult
cdd81c2744 meson.build: add -Woverride-init
enable override-init warning to catch some more bugs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-11 15:51:39 +02:00
Enrico Weigelt, metux IT consult
fdafb087d8 dix: fix SetPointerMapping reply success code on busy
If ApplyPointerMapping() returns `MappingBusy`, this value needs to be
returned in the `success` reply field. On `Success` the returned value
needs to be `MappingSuccess`.

Closes: https://github.com/X11Libre/xserver/issues/353
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-11 15:51:39 +02:00
Enrico Weigelt, metux IT consult
c5d5e8908d .github: drop obsolete xwayland dependencies
Since Xwayland is long gone, we don't need to install it's build-time
dependencies anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-09 14:09:01 +02:00
Enrico Weigelt, metux IT consult
d3c32cdfa8 Xi: fix wrong assertion in RetrieveTouchDeliveryData()
The assert(iclients) was in a place where the iclients variable could
not have been initialized ever - the first assignment is done *after* that.
Since we already have a BUG_RETURN_VAL() right be before it's actually
dereferenced, there's no need for that assert() at all - so drop it.

See https://github.com/X11Libre/xserver/issues/330

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-09 13:58:31 +02:00
Enrico Weigelt, metux IT consult
939ba0803c .github: add workflow for github releases
when tag xlibre-xserver-* is pushed, automatically create a github release.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-09 13:57:53 +02:00
Enrico Weigelt, metux IT consult
bab9362335 miext: damage: document DamageScreenFuncsRec
This struct (and associated functions) needs to be part of public driver ABI,
so video drivers can get notifications on damage certain operations, but
there hasn't been any documentation on it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 17:47:24 +02:00
Enrico Weigelt, metux IT consult
dfcfdd67a6 xquartz: drop using HAVE_DIX_CONFIG_H
This symbol is always defined, and the header is always present,
so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 17:43:07 +02:00
Enrico Weigelt, metux IT consult
2c50fedc2d xfree86: inputtest: use FatalError() instead of abort()
Directly calling abort() doesn't print a stack trace, nor any useful message.
Instead FatalError() should be used in cases, where there's really no other
way than terminating the Xserver. The FatalError function also tries to make
a smooth shutdown (eg. resetting video mode), so console doesn't end up locked.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 15:56:06 +02:00
stefan11111
c4df9ecdc5 kdrive: add documenation for mouse arguments
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-08 13:13:20 +02:00
stefan11111
d0c507d9e7 kdrive: const-qualify KdAddConfig{Keyboard,Pointer}'s argument
The passed name buffer isn't changed by those functions ever
(it would be a bug if they did so), therefore it should be const.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 13:13:20 +02:00
stefan11111
836013edca kdrive: move a local variable declaration to the top of the scope
Makes the code more consistent with the rest of the codebase

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-08 13:13:20 +02:00