Find a file
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
.gitlab-ci ci: Install wayland-protocols 1.38 2026-01-25 10:39:58 -08:00
composite dix: unexport Ones() 2026-01-25 10:39:57 -08:00
config treewide: replace xnfcalloc() calls by XNFcallocarray() 2026-01-25 10:39:55 -08:00
damageext prevent name clash on Windows w/ RT_* defines 2026-01-19 12:48:30 -08:00
dbe treewide: fix indentions got broke by recent commit 2026-01-25 10:39:56 -08:00
dix dix: limit checks to MAX_VALUATORS when generating Xi events 2026-01-25 10:39:58 -08:00
doc doc: drop removed functions from the Xserver spec 2026-01-25 10:39:56 -08:00
dri3 treewide: replace xnfalloc() calls to XNFalloc() 2026-01-25 10:39:55 -08:00
exa Move sizeof to second argument in calloc calls 2026-01-25 10:39:55 -08:00
fb Revert "fb: Declare wfbFinishScreenInit, wfbScreenInit for !FB_ACCESS_WRAPPER" 2026-01-25 10:39:58 -08:00
glamor include: dixfontstr.h: drop silent dependency on libxfont2 2026-01-25 10:39:56 -08:00
glx treewide: replace xnfstrdup() calls by XNFstrdup() 2026-01-25 10:39:55 -08:00
hw xwayland: Do not keep the cursor's pixmap around 2026-01-25 10:39:58 -08:00
include dix-config.h: add HAVE_SOCKLEN_T definition 2026-01-25 10:39:58 -08:00
man Xserver.man: Note that -byteswappedclients is the default in this release 2026-01-19 12:32:23 -08:00
mi mi: drop obsolete mibitblt.c 2026-01-25 10:39:56 -08:00
miext os: move os_move_fd() out of public API 2026-01-19 12:32:20 -08:00
os dix: Use __builtin_popcountl if available to replace Ones() 2026-01-25 10:39:57 -08:00
present build: Move epoll dependency check 2026-01-25 10:39:56 -08:00
pseudoramiX pseudoramix: replace PseudoramiXTrace & PseudoramiXDebug by LogMessageVerb 2026-01-25 10:39:57 -08:00
randr randr: fix wrong call to RRGetScreenResources() in swapped case 2026-01-25 10:39:57 -08:00
record record: clean up Sun/Solaris specific hack 2026-01-25 10:39:53 -08:00
render render: avoid NULL pointer dereference if PictureFindVisual returns NULL 2026-01-25 10:39:58 -08:00
test test: dix_input_valuator_masks(): use fixed array instead of VLA 2026-01-25 10:39:56 -08:00
Xext dix: unexport Ones() 2026-01-25 10:39:57 -08:00
xfixes Move sizeof to second argument in calloc calls 2026-01-25 10:39:55 -08:00
Xi Xi: avoid NULL pointer dereference if GetXTestDevice returns NULL 2026-01-25 10:39:58 -08:00
xkb xkb: Fix buffer overflow in _XkbSetCompatMap() 2026-01-25 10:39:58 -08:00
.appveyor.yml appveyor: Add libxcvt build dep 2021-11-04 13:03:25 +00:00
.dir-locals.el .dir-locals.el: Add missing final newline 2019-10-01 17:05:28 +00:00
.git-blame-ignore-revs Ignore the coding style change commit during git blame 2026-01-25 10:39:58 -08:00
.gitignore Clean up the .gitignore file 2024-01-12 00:50:24 +00:00
.gitlab-ci.yml ci: Install wayland-protocols 1.38 2026-01-25 10:39:58 -08:00
.mailmap Add a .mailmap file to canonicalize author names and emails 2023-03-15 18:10:51 +00:00
.travis.yml travis: Add OSX meson build to matrix 2019-05-02 15:42:58 +00:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46:02 -07:00
meson.build build: Bump wayland-protocols requirement to 1.38 2026-01-25 10:39:58 -08:00
meson_options.txt os: drop SUN-DES-1 authentication 2026-01-25 10:39:53 -08:00
README.md Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
xorg-server.m4 xorg-server.m4: just all cflags instead of just sdkdir 2018-09-20 20:12:24 +01:00
xorg-server.pc.in xfree86: link modules against Xorg symbols on Cygwin 2012-04-05 21:57:07 -05:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00

X Server

The X server accepts requests from client applications to create windows, which are (normally rectangular) "virtual screens" that the client program can draw into.

Windows are then composed on the actual screen by the X server (or by a separate composite manager) as directed by the window manager, which usually communicates with the user via graphical controls such as buttons and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the following article: https://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the Xorg mailing list:

https://lists.freedesktop.org/mailman/listinfo/xorg

The primary development code repository can be found at:

https://gitlab.freedesktop.org/xorg/xserver

For patch submission instructions, see:

https://www.x.org/wiki/Development/Documentation/SubmittingPatches

As with other projects hosted on freedesktop.org, X.Org follows its Code of Conduct, based on the Contributor Covenant. Please conduct yourself in a respectful and civilized manner when using the above mailing lists, bug trackers, etc:

https://www.freedesktop.org/wiki/CodeOfConduct