Commit Graph

20894 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
b009ed14de randrstr.h 2025-07-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
ece4a53c57 include/client.h 2025-07-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
bc72859467 displaymode.h 2025-07-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
a3d9e5765f damage.h 2025-07-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
61035d57d9 xfixes: 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-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
96edb55b95 ramdr: 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-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
109a9c9804 miext: 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-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
cf4db6cbd6 include: 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-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
83a1e38ab5 mi: 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-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
1b0927ed2f composite: compositeext.h: drop not needed include of dix-config.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
1fc52f9acb xkb: 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-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
65789a894e test: xi2: drop unused check for HAVE_DIX_CONFIG_H
The symbol is always defined, so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
ca321ea74e mi: mivalidate.h: drop unnecessary check for HAVE_DIX_CONFIG_H
The symbol is always defined, so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
9b3912f2ff mi: miscanfill.h: drop unnecessary check for HAVE_DIX_CONFIG_H
The symbol is always defined, so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
c3fdb734b8 composite: drop unnecessary check for HAVE_DIX_CONFIG_H
The symbol is always defined, so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:53 +02:00
Enrico Weigelt, metux IT consult
dd044ce9a5 bigreq: declare reply struct where needed
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
72131163c2 dix: rpcbuf: flag for auto-clear in error case
when the err_clear flag is set, the buffer memory will automatically
be free()ed when allocation failed. This allows simplificatoin of
caller's error pathes: the caller doesn't need to to call x_rpcbuf_clear()
anymore and eg. can directly return out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
4b542d4a98 dix: rpcbuf: store allocation failure
Remember allocation failure in new `error` field, for easing error
handling in complex callers: those now don't need to check each single
return value, but can (try to) continue their normal operation and
check for error condition later.

For example we can turn this:

     for (....) {
        if (!x_rpcbuf_write_CARD16(&rpcbuf,...)) {
            [ various cleanups ]
            return BadAlloc;
        }
        if (!rpcbuf_write_CARD8s(&rpcbuf,...)) {
            [ various cleanups ]
            return BadAlloc;
        }
        [ more of this ]
    }
    ...

Into:

     for (....) {
        x_rpcbuf_write_CARD16(&rpcbuf,...));
        x_rpcbuf_write_CARD8s(&rpcbuf,...));
        [ more of this ]
    }
    ...

    if (&rpcbuf->error) {
        [ various cleanups ]
        return BadAlloc;
    }

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
97c2d75f10 dix: add buffer helper for rpc payload assembly
Since so many request handlers have to assemble complex reply payloads,
we've got a lot complexity on counting the needed space and filling in
the data into the right places.

Thus adding a little dynamic buffer structure, where one just can append
data arbitrarily. The buffer will automatically allocate memory as-needed
and finally leave everything in a big memory block for later write-out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
4a0eb60434 os: osdep.h: 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-18 02:03:04 +02:00
Dudemanguy
e79b8ecf1f randr: set initial DPI property to a default value for all outputs
X has various ways to deal with DPI but all of the current methods have
some drawback (single global value, manually calculating from physical
dimensions, etc.) What is lacking is a simple value per output that
users and applications can use to communicate desired scaling values.
Fortunately, a generic output property mechanism already exists. And
they already send events whenever there is a change. So all we have to
do is make an "official" property for people to agree on and enshrine
it. In that case, all outputs can just always have the DPI property set
to something. In most cases, this will be 96 (the default), but one
could use the -dpi argument when launching or and that value will be
used instead. The intention is that 96 is the base that is equivalent to
1x scaling. i.e. 192 would be 2x, 144 would be 1.5x and so on. xrandr or
any other utility can modify this property at any time and applications
can choose to use the number in a way that makes sense.

Closes #208. Credit to @dec05eba for essentially coming up with the idea
of using output properties.

Signed-off-by: Dudemanguy <random342@airmail.cc>
2025-07-18 02:03:04 +02:00
stefan11111
be70f0d386 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-18 02:03:04 +02:00
stefan11111
a7819dfa4f 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-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
2e5b9f6383 dix: inpututils_priv.h: clean up guard
Give the guard a more unique name.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
065754778f dix: inpututils_priv.h: drop unneeded extern
function prototypes are by default always extern, so no need for
that extra qualifier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
3ff1ca3288 dix: inpututils_priv.h: drop HAVE_DIX_CONFIG_H check
It's always defined, so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
0b446a5933 dix: move inpututils.h and rename it to inpututil_privs.h
it's a private header, thus should not be in public include directory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
8d8a300ee4 os: move probes.h and rename it to probes_priv.h
Private headers should not be in public include directory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
17f6926130 glx: drop including dix-config.h from internal includes
The consumers always need to include <dix-config.h> at the very top
anyways, so no need to also include it (with extra guards) from
internal headers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
76dd7fe4bf config: 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-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
27bde168d4 fb: fbbits.h: no need to include dix-config.h here
All in-tree consumers already need to include dix-config.h on the very
top anyways, and there are no out-of-tree consumers (private to fb subsys)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
ddfa659dd2 fb: fbpict.h: no need to include dix-config.h here
All in-tree consumers already need to include dix-config.h on the very
top anyways, and out-of-tree consumers don't have that include at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
Enrico Weigelt, metux IT consult
f27d1b5e2a glamor: glamor.h: don't need to include fbpict.h
This header doesn't need anything from fbpict.h, so no need to
include it here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
stefan11111
09e129f5b5 kdrive: constitfy kdOsFuncs & document KdOsInit()
Not supposed to be written to (once the pointer is assigned),
so should be marked const. Also document KdOsInit()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 02:03:04 +02:00
stefan11111
ada8cbf6ca kdrive: ephyr: initialize OS specific callback vectors
These will be used by subsequent commits for generic Kdrive
functions calling back into the OS specific parts

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-18 02:03:04 +02:00
stefan11111
3802571e34 kdrive: add KdOsInit
Kdrive X servers used to do the OS-speciffic init part using KdOsInit.
This was changed in modern Xorg because Xephyr is the only kdrive
X server there, so there was no need to keep this generic.
Since we want to eventually add Xfbdev, we need to add this back.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-18 02:03:04 +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