Find a file
Ville Syrjälä f9b1229edc present: Walk all children when setting window pixmaps
We currently skip setting the window pixmap on any window
not using its parent's pixmap. That does not work correctly
in the presence of reparenting.

Consider the following scenario:
1. window A is created as child of B
2. present starts flipping and sets the whole window
   tree to use pixmap X
3. window C is created (uses the screen pixmap by default)
4. window A is reparented to C
5. present stops flipping and attempts to set the
   whole window tree back to the screen pixmap,
   except the walk terminates at window C
   since it's using an unexpected pixmap, and
   window A is left with the stale pixmap X
6. pixmap X is destroyed
7. the X server segfaults on a rendering operation
   on window A due the stale pixmap

I managed to hit this with mpv (doing present flips)
and crack-attack (keeps alternating between a menu
window and an actual game window):
1. start both applications
2. start a game in crack-attack
3. fullscreen mpv
4. end the game in crack attack
5. unfullscreen mpv
6. the crack-attack menu window has appeared, but
   might be corrupted and doing stuff on it segfaults
   the X server

I suppose the other option might be to make new windows
automatically inherit their parent's pixmap instead
of using the screen pixmap. But I've not looked into
how that would affect eg. composite.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2026-02-14 15:58:51 -08:00
.gitlab-ci xwayland/ci: Enforce various code style checks 2026-01-25 11:47:31 -08:00
composite composite: Skip copying parent pixmap contents when possible 2026-02-14 12:37:18 -08:00
config Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
damageext damage: drop swapping request length fields 2026-01-25 10:39:59 -08:00
dbe dbe: fix byte swapping in SProcDbeSwapBuffers() 2026-01-25 10:40:00 -08:00
dix dix: avoid null ptr deref at doListFontsAndAliases 2026-02-14 18:55:55 +00:00
doc Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
dri3 dri: prevent out-of-bounds read in dri3_fd_from_pixmap 2026-01-25 10:40:03 -08:00
exa Move sizeof to second argument in calloc calls 2026-01-25 10:39:55 -08:00
fb Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
glamor Revert "glamor: explicitly draw endpoints of line segments" 2026-02-14 23:44:16 +00:00
glx glx: Don't blindly write 8 bytes in GLX single replies 2026-01-25 10:40:02 -08:00
hw xf86: Accept devices with the kernel's vesadrm driver 2026-02-14 23:39:34 +00:00
include xkb: Make the RT_XKBCLIENT resource private 2026-01-25 10:40:03 -08:00
man man pages: strip trailing whitespace 2026-01-25 10:40:01 -08:00
mi mi: use common implementation of bit counting function 2026-01-25 10:40:01 -08:00
miext Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
os os: make FormatInt64() handle LONG_MIN correctly 2026-01-25 10:40:03 -08:00
present present: Walk all children when setting window pixmaps 2026-02-14 15:58:51 -08:00
pseudoramiX pseudoramiX: drop swapping request length fields 2026-01-25 10:39:58 -08:00
randr randr: do full transform when checking SetScreenSize size 2026-02-14 15:20:23 -08:00
record Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
render render: fix multiple mem leaks on err paths 2026-02-14 18:50:30 +00:00
test Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
Xext Xext/xtest: avoid null dereference in ProcXTestFakeInput() 2026-01-25 10:40:03 -08:00
xfixes xfixes: Check request length for SetClientDisconnectMode 2026-01-25 10:40:01 -08:00
Xi Xi: handle allocation failure in add_master_func() 2026-01-25 10:40:03 -08:00
xkb xkb: Fix serialization of key type without level names 2026-02-14 13:06:31 -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 xwayland/ci: Enforce various code style checks 2026-01-25 11:47:31 -08:00
.mailmap Update mailmap for Peter Harris 2026-01-25 10:40:01 -08:00
.travis.yml travis: Add OSX meson build to matrix 2019-05-02 15:42:58 +00:00
COPYING COPYING: add author to HPND-sell-MIT-disclaimer-xserver 2026-02-14 20:27:44 +00:00
meson.build meson.build: include Xephyr in output of which ddx we're building 2026-01-25 10:40:02 -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
SECURITY.md Create a SECURITY.md file 2026-01-25 10:40:03 -08:00
xorg-server.m4 Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
xorg-server.pc.in pkgconfig files: Add URL 2026-01-25 10:40:01 -08: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