Find a file
Ville Syrjälä e9ffff31e4 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>
2025-03-03 12:53:49 +02:00
.gitlab-ci ci: update XTS to a commit that doesn't require -fcommon workaround 2025-02-17 19:16:04 +00:00
composite composite: use dixDestroyPixmap() instead of direct driver call 2025-02-12 17:48:30 +01:00
config linux: Fix BUS_PLATFORM detection for non-PCI devices 2025-02-07 15:10:17 +00:00
damageext os: move out extension disable flags to corresponing extensions 2025-02-07 12:00:53 +01:00
dbe dbe: use dixDestroyPixmap() instead of direct driver call 2025-02-12 17:48:30 +01:00
dix misc.h: unexport compare_version() 2025-02-18 11:17:40 +00:00
doc misc.h: drop LengthRestB() macro 2025-02-17 19:25:14 +00:00
dri3 os: unexport WriteFdToClient() 2025-02-18 10:53:44 +00:00
exa exa: simplify CreatePixmap()/DestroyPixmap() handlers error pathes 2025-02-12 17:48:30 +01:00
fb fb: use dixDestroyPixmap() instead of direct driver call 2025-02-12 17:48:30 +01:00
glamor glamor: use explicit field initializers for XF86ModuleData 2025-02-17 19:41:29 +00:00
glx os: unexport ResetCurrentRequest() 2025-02-18 10:53:45 +00:00
hw dri2: Protect against dri2ClientPrivate assertion failures 2025-02-19 11:25:01 +00:00
include misc.h: unexport compare_version() 2025-02-18 11:17:40 +00:00
man Xserver.man: Note that -byteswappedclients is the default in this release 2024-03-23 10:27:03 -07:00
mi os: move BUG_*() macros to own private header 2025-02-17 19:32:48 +00:00
miext os: move BUG_*() macros to own private header 2025-02-17 19:32:48 +00:00
os misc.h: unexport compare_version() 2025-02-18 11:17:40 +00:00
present present: Walk all children when setting window pixmaps 2025-03-03 12:53:49 +02:00
pseudoramiX pseudoramiX: drop swapping request length fields 2025-02-06 22:28:49 +00:00
randr misc.h: unexport compare_version() 2025-02-18 11:17:40 +00:00
record record: drop swapping request length fields 2025-02-06 22:28:49 +00:00
render os: move BUG_*() macros to own private header 2025-02-17 19:32:48 +00:00
test misc.h: unexport compare_version() 2025-02-18 11:17:40 +00:00
Xext os: unexport ResetCurrentRequest() 2025-02-18 10:53:45 +00:00
xfixes misc.h: unexport compare_version() 2025-02-18 11:17:40 +00:00
Xi misc.h: unexport compare_version() 2025-02-18 11:17:40 +00:00
xkb os: move BUG_*() macros to own private header 2025-02-17 19:32:48 +00: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 2024-12-06 09:55:53 +10:00
.gitignore Clean up the .gitignore file 2024-01-12 00:50:24 +00:00
.gitlab-ci.yml ci: update freebsd builder image 2025-02-18 10:43:28 +01: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 2024-12-02 08:55:34 +00:00
meson_options.txt os: drop SUN-DES-1 authentication 2024-06-18 00:52:11 +00: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