From 66f9d19106c68fcf9339139c551040614a47dc86 Mon Sep 17 00:00:00 2001 From: Window Maker Date: Sun, 24 May 2026 16:56:08 +0200 Subject: [PATCH] WINGs/wview_wl: don't redisplay from wl_map if parent lacks backing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During W_RealizeView recursion, children are realized and mapped before their parent's backing pixman image exists. wl_map triggered wl_redisplay which sent an expose event, the widget painted itself, and render_wl_pixmap_copy tried to composite up through the parent chain — hitting a NULL pixman image in pixman_image_composite32. Fix: before triggering wl_redisplay from wl_map, walk up the parent chain and verify all ancestors have valid backings. If any ancestor lacks a backing (still being realized), skip the redisplay — the parent's wl_map will handle it once the full tree is ready. --- WINGs/wview_wl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/WINGs/wview_wl.c b/WINGs/wview_wl.c index 3f4bb66..4363bb2 100644 --- a/WINGs/wview_wl.c +++ b/WINGs/wview_wl.c @@ -268,6 +268,15 @@ static void wl_map(void *vctx, W_View *view) (void)vctx; view->flags.mapped = 1; if (view->flags.realized && wl_redisplay_depth == 0) { + /* Only redisplay if all ancestors have backings (are realized). + * During W_RealizeView recursion, children may be mapped before + * their parent's backing exists. */ + W_View *v = view; + while (v->parent) { + if (!W_GetViewBacking(v->parent->window)) + return; + v = v->parent; + } wl_redisplay(vctx, view); } }