Find a file
Michel Dänzer c76d495612 Revert "xwayland: Call register_damage depending on ensure_surface_for_window"
There've been reports downstream of Xwayland segfaulting in the function
xwl_present_execute() because xwl_window_get_damage_region() returned an
invalid pointer:

 #10 RegionUninit at ../include/regionstr.h:165
 #11 RegionEmpty at ../include/regionstr.h:194
 #12 xwl_present_execute at ../hw/xwayland/xwayland-present.c:1138
 #13 xwl_present_pixmap at ../hw/xwayland/xwayland-present.c:1274
 #14 present_pixmap at ../present/present.c:249
 #15 proc_present_pixmap_common at ../present/present_request.c:166
 #16 proc_present_pixmap at ../present/present_request.c:186
 #17 Dispatch at ../dix/dispatch.c:550
 #18 dix_main at ../dix/main.c:277

The most likely reason for this is that window_get_damage() returned
NULL, which might happen if xwl_window_update_surface_window() didn't
call register_damage().

To avoid that issue, move the call to register_damage() back to
xwl_realize_window before calling ensure_surface_for_window().

This reverts commit 07f6032627.

See-also: https://bugzilla.redhat.com/2329815
See-also: https://bugzilla.redhat.com/2428249
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1862
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2135>
2026-03-03 14:05:15 +01: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 Fix typos 2026-03-03 06:50:01 -03:00
doc Fix typos 2026-03-03 06:50:01 -03:00
dri3 dri: prevent out-of-bounds read in dri3_fd_from_pixmap 2026-01-25 10:40:03 -08:00
exa Fix typos 2026-03-03 06:50:01 -03:00
fb Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
glamor Fix typos 2026-03-03 06:50:01 -03:00
glx Fix typos 2026-03-03 06:50:01 -03:00
hw Revert "xwayland: Call register_damage depending on ensure_surface_for_window" 2026-03-03 14:05:15 +01:00
include Fix typos 2026-03-03 06:50:01 -03:00
man Fix typos 2026-03-03 06:50:01 -03:00
mi Fix typos 2026-03-03 06:50:01 -03:00
miext Fix typos 2026-03-03 06:50:01 -03:00
os Fix typos 2026-03-03 06:50:01 -03:00
present present: Fix use-after-free in present_create_notifies() 2026-01-25 10:40:03 -08:00
pseudoramiX pseudoramiX: drop swapping request length fields 2026-01-25 10:39:58 -08:00
randr randr: clear primary screen's primaryOutput when the output is deleted 2026-02-14 17:03:30 -08:00
record Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
render Fix typos 2026-03-03 06:50:01 -03:00
test Fix typos 2026-03-03 06:50:01 -03:00
Xext Fix typos 2026-03-03 06:50:01 -03: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 Fix typos 2026-03-03 06:50:01 -03: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 Disable pciaccess for mingw 2026-02-22 07:36:50 -06: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