From a9397b82916b535472e8c20580ee3dcaca32ff91 Mon Sep 17 00:00:00 2001 From: lkn Date: Sun, 7 Jun 2026 14:46:02 +0200 Subject: [PATCH] wl_unmap: force commit sibling toplevels to clear stale popup pixels When a topLevel popup is unmapped, wl_redisplay(view-parent) clears stale popup pixels from the parent backing. But for rootView (common parent), the commit at the end of wl_redisplay is a no-op because rootView has no WLClientToplevel. The cleared backing was never pushed to any surface. Fix: iterate parent child list and force-commit every topLevel sibling, pushing the cleared backing to their wl_buffers. --- WINGs/wview_wl.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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)