diff --git a/WINGs/wview_wl.c b/WINGs/wview_wl.c index 5bd87ac..1d65b2f 100644 --- a/WINGs/wview_wl.c +++ b/WINGs/wview_wl.c @@ -211,8 +211,25 @@ static void wl_unmap(void *vctx, W_View *view) /* Disable the scene buffer so the view disappears from screen. */ if (W_ViewSceneNodeSetEnabledFn) W_ViewSceneNodeSetEnabledFn((unsigned long)view->window, 0); - if (view->parent && view->parent->flags.mapped) + if (view->parent && view->parent->flags.mapped) { wl_redisplay(vctx, view->parent); + /* Force commit of the parent backing so stale pixels from + * previous composites (via wl_redisplay line 530) are cleared. + * If the parent itself cannot be committed (e.g. rootView), + * commit all topLevel children that have a client backing. */ + extern void (*W_ViewCommitBackingFn)(unsigned long id); + if (W_ViewCommitBackingFn) { + W_View *parent = view->parent; + W_View *child = parent->childrenList; + while (child) { + if (child->flags.topLevel && child->flags.realized + && child != view) + W_ViewCommitBackingFn( + (unsigned long)child->window); + child = child->nextSister; + } + } + } } static void wl_unmap_subviews(void *vctx, W_View *view)