Enrico Weigelt, metux IT consult
ffd7446d4d
xfree86: xf86helper: fix NULL dereference
...
xf86MatchDevice() can segfault if screensecptr->device is NULL.
Issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1767
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1847 >
(cherry picked from commit fe9c911e22 )
2026-01-25 10:40:01 -08:00
Enrico Weigelt, metux IT consult
0d24538c6d
xwin: don't need NULL check before free()
...
free() is safe against NULL arguments.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1818 >
(cherry picked from commit 573d70ae25 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
dc2df95385
xfree86: modesetting: don't use VLA
...
even through this specific case is correct and safe, it's safer to
remove all VLA usages and forbid them completely by compiler flag.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1819 >
(cherry picked from commit f894801fa2 )
2026-01-25 10:40:00 -08:00
Doug Brown
0fcef31fd8
dri2: Protect against dri2ClientPrivate assertion failures
...
If DRI2ScreenInit hasn't been called yet, DRI2Authenticate and
DRI2CreateDrawable2 cause the X server to crash. This has been observed
to happen on multiple modern Linux distros in various conditions,
including QEMU and VMware VMs. Make these functions more robust in order
to prevent the crash.
This patch was originally provided by Bernhard Übelacker and expanded
upon by Mark Wagner.
Signed-off-by: Doug Brown <doug@schmorgal.com >
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1053
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1534
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1608 >
(cherry picked from commit a0834009cf )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
a1be877d43
xfree86: doc: update docs on XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit 80f5d29c84 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
511243a4c1
xfree86: inputtest: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit e88762896e )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
001df8ad29
xfree86: modsetting: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit 2a10eff6c5 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
20bd82e972
xfree86: exa: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit c8ad9c6567 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
6775511085
xfree86: fbdevhw: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit c862cf3c3a )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
eaabd43c7e
xfree86: xf86int10module: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit d87e93bf40 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
81a42ac3b8
xfree86: xfbmodule: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit f54993a222 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
2f5fba159c
xfree86: vgaHWmodule: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit a2e20304e0 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
e2738f3790
xfree86: shmodule: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit 3066125bec )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
5722da8f4b
xfree86: sfbmodule: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit f0590decb6 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
9ac862ff82
xfree86: glxmodule: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit 03becba76b )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
81e39745f9
xfree86: fbmodule: use explicit field initializers for XF86ModuleData
...
Even though the order of these fields shouldn't change anytime
soon, it's still better programming style to name'em explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit 7dd8d0627c )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
010a5fb420
xfree86: xf86configure: use NULL instead of 0
...
Zero pointers should be initialized w/ NULL instead of raw 0.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1788 >
(cherry picked from commit 1848027892 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
5f0b547522
dri: report failed memory allocation
...
ProcXF86DRIGetDrawableInfo() should report failed memory allocation instead
of pretending everything's okay.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1797 >
(cherry picked from commit 94d942267a )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
e2b88e3143
modsetting: also add libglx to library symbol test
...
Increase test coverage a bit.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1798 >
(cherry picked from commit 2539ddae50 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
67fbb2b1b9
xfree86: os-support: unexport xf86scanpci()
...
Not used by any drivers/modules, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1800 >
(cherry picked from commit e10283d842 )
2026-01-25 10:40:00 -08:00
Andy Myers
39a67e9e03
xvfb: Add multiple CRTC support
...
Multiple CRTCs can be added on a per-screen basis with the new -crtcs
option. Each CRTC has one associated output. Outputs beyond the first
are disabled by default and can be enabled by setting a mode. Outputs
can be disabled again by setting the associated CRTC's mode and output
to None.
Signed-off-by: Andy Myers <andy.myers@zetier.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1749 >
(cherry picked from commit 7933cc24d0 )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
24da5e83c4
xfree86: xf86Opt.h: fix missing include
...
<X11/Xdefs.h> is needed for `Bool` type.
Consumers shouldn't have to rely on Xdefs.h being accidentally included
by something else.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1782 >
(cherry picked from commit 80a3df55ae )
2026-01-25 10:40:00 -08:00
Aki Sakurai
f27942078f
xquartz: fix inverted tablet pen Y tilt on macOS
...
On macOS, the y tilt behavior is inverted; an increase in the tilt
value corresponds to tilting the device away from the user.
see https://chromium-review.googlesource.com/c/chromium/src/+/2348544
see 0f128fd7c5/src/plugins/platforms/cocoa/qnsview_tablet.mm (L63)
Fixes #792
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1779 >
(cherry picked from commit 3562298068 )
2026-01-25 10:40:00 -08:00
Aki Sakurai
a49a8a3cf9
xquartz: fix compilation
...
Fixes #1788
Fixes: 21df7a77d ("xquartz: fix length checking with bigreq")
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1777 >
(cherry picked from commit da0de21b72 )
2026-01-25 10:40:00 -08:00
Spiky Caterpillar
d54c1e6c44
No longer leak FDs on VT switch.
...
Modified-by: Povilas Kanapickas <povilas@radix.lt >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/997 >
(cherry picked from commit 2631cad85d )
2026-01-25 10:40:00 -08:00
Enrico Weigelt, metux IT consult
631064399a
xfree86: vgahw: drop obsolete vgaHWSaveScreenWeak()
...
No callers left, so no need to keep it around anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724 >
(cherry picked from commit 4235d2375a )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
6acdd6fe93
xfree86: vgahw: drop obsolete vgaHWDisable()
...
No callers left, so no need to keep it around anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724 >
(cherry picked from commit be9b89ef0f )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
0b9b03310e
xfree86: vgahw: drop obsolete vgaHWSetRegCounts
...
No callers left, so no need to keep it around anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724 >
(cherry picked from commit bb0295b397 )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
f030036e67
xfree86: vgahw: make vgaHWSaveColormap() static
...
No external callers anymore, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724 >
(cherry picked from commit 515d19806c )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
4619318120
xfree86: vgahw: make vgaHWSaveMode() static
...
No external callers left, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724 >
(cherry picked from commit 79522220a6 )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
4aa3815d2b
xfree86: vgaha: make vgaHWRestoreColormap() static
...
No external callers left, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724 >
(cherry picked from commit f004998b78 )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
0bdb813750
xfree86: vgahw: make vgaHWRestoreMode() static
...
No external callers anymore, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724 >
(cherry picked from commit 30380cb207 )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
ac274eaf39
xfree86: vgahw: drop obsolete vgaHWBlankScreenWeak()
...
Not used anymore, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724 >
(cherry picked from commit cd2457412f )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
eb21cdaf4e
xfree86: vgahw: drop obsolete vgaHWProtectWeak()
...
Not used anymore, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724 >
(cherry picked from commit a415e6ed37 )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
92e1e0eec5
xfree86: drop obsolete macro INITARGS
...
This macro isn't used anymore for 12 years now, see commit:
5079db78ae
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1722 >
(cherry picked from commit b0452ecff4 )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
c5f11163d8
xfree86: common: dont install xf86MatchDrivers.h
...
xf86MatchDrivers.h doesn't export any symbols, thus doesn't need to
be installed.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1738 >
(cherry picked from commit cd52a8f8a4 )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
51d0126cf0
xfree86: unexport xf86PlatformMatchDriver()
...
Not used by any drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1738 >
(cherry picked from commit 0b123a0413 )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
4b1f99e9db
xfree86: drop now obsolete swap procs
...
Several SProc's have become no-ops, just calling the actual Proc's,
so we can get rid of them entirely.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639 >
(cherry picked from commit 16ca87703c )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
131c8839d6
xwin: drop swapping request length fields
...
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639 >
(cherry picked from commit 643f91266e )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
d122c3f7a0
xwayland: drop swapping request length fields
...
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639 >
(cherry picked from commit 4cb141307c )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
126c901200
xquartz: drop swapping request length fields
...
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639 >
(cherry picked from commit 65224a2f9a )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
5213d2bd24
xfree86: drop swapping request length fields
...
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639 >
(cherry picked from commit 7e5c342be1 )
2026-01-25 10:39:59 -08:00
Enrico Weigelt, metux IT consult
f5a24358bf
xquartz: fix length checking with bigreq
...
The authorative source of the request frame size is client->req_len,
especially with big requests larger than 2^18 bytes.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639 >
(cherry picked from commit ef396a28b7 )
2026-01-25 10:39:58 -08:00
Enrico Weigelt, metux IT consult
5951f1f415
xfree86: parser: rename IOBASE for fixing name conflict
...
Resolve conflicts with OS headers definining IOBASE by renaming the
IOBASE enum value to XF86_TOKEN_IOBASE.
This way, don't need the special #undef hack anymore.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1405 >
(cherry picked from commit 584bbe9988 )
2026-01-25 10:39:58 -08:00
Enrico Weigelt, metux IT consult
f171a631ff
xfree86: parser: drop obsolete token enum values
...
These have been forgotten on some major cleanup back almost two decades ago.
(Daniel dropped a lot of dead code, which already had been removed earlier
but merged back accidentially).
Didn't look further back on where exactly they had become obsolete - being
unused for decades should be enough justification for dropping.
Fixes: 81913a1291
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1405 >
(cherry picked from commit a1fa019012 )
2026-01-25 10:39:58 -08:00
Olivier Fourdan
f719341987
xwayland/glamor: Disable GLAMOR after GBM cleanup
...
The cleanup function for GBM is called on the various error paths.
Once xwl_glamor_gbm_cleanup() has been called, GBM support is no longer
usable (and the corresponding data structures are freed), so there is
no way we can keep using GLAMOR after that point.
Make sure to explicitly disable GLAMOR support in that case, so we do
not crash later on trying to use GBM.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1768 >
(cherry picked from commit e8784b7d89 )
2026-01-25 10:39:58 -08:00
Michel Dänzer
dc95d5cbc2
xwayland/glamor: Clean-up GBM's screen private on failure
...
If we bail out initializing GBM glamor backend, the screen private for
the GBM backend may remain, pointing at freed memory.
To avoid that issue, make sure to clear up the screen's private for the
GBM backend.
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1785
Signed-off-by: Michel Dänzer <michel@daenzer.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1768 >
(cherry picked from commit b27b5cd5f3 )
2026-01-25 10:39:58 -08:00
Julian Orth
d038d2c080
xwayland: Don't run key behaviors and actions
...
Consider the following keymap:
```xkb
xkb_keymap {
xkb_keycodes {
<compose> = 135;
};
xkb_symbols {
key <compose> {
[ SetGroup(group = +1) ]
};
};
};
```
When the user presses the compose key, the following happens:
1. The compositor forwards the key to Xwayland.
2. Xwayland executes the SetGroup action and sets the base_group to 1
and the effective group to 1.
3. The compositor updates its own state and sends the effective group,
1, to Xwayland.
4. Xwayland sets the locked group to 1 and the effective group to
1 + 1 = 2.
This is wrong since pressing compose should set the effective group to 1
but to X applications the effective group appears to be 2.
This commit makes it so that Xwayland completely ignores the key
behaviors and actions of the keymap and only updates the modifier and
group components in response to the wayland modifiers events.
Signed-off-by: Julian Orth <ju.orth@gmail.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1758 >
(cherry picked from commit 45c1d22ff6 )
2026-01-25 10:39:58 -08:00
Julian Orth
c74a340dc6
xwayland: copy repeat settings from the compositor map
...
Previously the repeat settings sent by the compositor were completely
ignored.
Signed-off-by: Julian Orth <ju.orth@gmail.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1759 >
(cherry picked from commit 8d9184db5f )
2026-01-25 10:39:58 -08:00
Olivier Fourdan
8830263b0a
xwayland: Do not keep the cursor's pixmap around
...
Currently, Xwayland creates a pixmap backed by shared memory buffer as
soon as an X11 cursor is realized, which is destroyed when the cursor is
eventually unrealized.
If an X11 client is leaking cursors, Xwayland will be creating new
pixmaps continuously, which will eventually cause an error once the
limit is reached, and get Xwayland killed.
However, we do not need the shared memory buffer to stay around, we
already have the buffer retention mechanism which will take care of
keeping the buffer around until the Wayland compositor is done with it,
so we could just create and destroy the pixmap as needed when setting
the cursor.
That would not fix the leak in the X11 application, yet that would
mitigate the risk of Xwayland being killed by reaching the shared memory
limits, until the client itself reaches the limit of X11 resources.
v2: Don't increase the pixmap refcnt to destroy it just after (Michel)
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Suggested-by: Michel Dänzer <michel@daenzer.net >
See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1773
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1754 >
(cherry picked from commit 8707d2835c )
2026-01-25 10:39:58 -08:00