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.
This commit is contained in:
parent
66f9d19106
commit
9873adf689
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue