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.
This commit is contained in:
lkn 2026-06-07 14:46:02 +02:00
parent 971089b3d9
commit a9397b8291
1 changed files with 18 additions and 1 deletions

View File

@ -211,8 +211,25 @@ static void wl_unmap(void *vctx, W_View *view)
/* Disable the scene buffer so the view disappears from screen. */ /* Disable the scene buffer so the view disappears from screen. */
if (W_ViewSceneNodeSetEnabledFn) if (W_ViewSceneNodeSetEnabledFn)
W_ViewSceneNodeSetEnabledFn((unsigned long)view->window, 0); 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); 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) static void wl_unmap_subviews(void *vctx, W_View *view)