xserver/hw
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
..
kdrive Fix typos 2026-03-03 06:50:01 -03:00
vfb man pages: remove extraneous PP macros 2026-01-25 10:40:01 -08:00
xfree86 Fix typos 2026-03-03 06:50:01 -03:00
xnest Xnest: use authorative declarations from X11/XKBlib.h 2026-01-25 10:40:01 -08:00
xquartz Fix typos 2026-03-03 06:50:01 -03:00
xwayland Revert "xwayland: Call register_damage depending on ensure_surface_for_window" 2026-03-03 14:05:15 +01:00
xwin Fix typos 2026-03-03 06:50:01 -03:00
meson.build meson.build: print a summary of the DDX to build 2026-01-25 10:40:01 -08:00