wl_view_scene_node_set_enabled: also handle WINGs client toplevels (popups)

The function only searched for wl_frame_buf entries to enable/disable
their scene nodes. WINGs client popup menus have their own xdg_toplevel
surface with a scene_node but no wl_frame_buf. On unmap, the scene node
was never disabled, so the popup content remained rendered underneath
other windows.

Fix: fall through to wl_find_view_by_id when no frame_buf is found,
and operate on the wl_toplevel_view->scene_node instead.
This commit is contained in:
lkn 2026-06-07 13:45:50 +02:00
parent ff86d8055f
commit 971089b3d9
1 changed files with 8 additions and 1 deletions

View File

@ -320,8 +320,15 @@ void
wl_view_scene_node_set_enabled(unsigned long id, int enabled)
{
struct wl_frame_buf *fb = frame_buf_find((WNativeWindow)id);
if (fb && fb->scene_buf)
if (fb && fb->scene_buf) {
wlr_scene_node_set_enabled(&fb->scene_buf->node, !!enabled);
return;
}
/* Also handle WINGs client toplevels (popup menus) that have
* their own xdg_surface with a scene_node but no wl_frame_buf. */
struct wl_toplevel_view *v = wl_find_view_by_id((WNativeWindow)id);
if (v && v->scene_node)
wlr_scene_node_set_enabled(&v->scene_node->node, !!enabled);
}