WINGs/wview_wl: don't redisplay from wl_map if parent lacks backing
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.
This commit is contained in:
parent
b2f878314c
commit
66f9d19106
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue