From 9873adf68967468611573e3079d53ee45faa0123 Mon Sep 17 00:00:00 2001 From: Window Maker Date: Sun, 24 May 2026 16:58:58 +0200 Subject: [PATCH] WINGs/wview_wl: only trigger wl_redisplay from wl_map for toplevels The parent-backing-check approach was too fragile. Simplify: wl_map only triggers wl_redisplay for toplevel views. Non-toplevel views become visible through: 1. render_wl_pixmap_copy composite-up (when widget paints itself) 2. wl_map_subviews (which redisplays the parent after mapping children) 3. Parent's recursive wl_redisplay (which iterates all mapped children) This avoids crashes during W_RealizeView recursion where children are mapped before the widget tree is fully constructed. --- WINGs/wview_wl.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/WINGs/wview_wl.c b/WINGs/wview_wl.c index 4363bb2..939c44a 100644 --- a/WINGs/wview_wl.c +++ b/WINGs/wview_wl.c @@ -267,16 +267,7 @@ 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; - } + if (view->flags.realized && view->flags.topLevel) { wl_redisplay(vctx, view); } }