Fix menu unmap: hide children when parent is unmapped

wl_window_unmap now disables child scene nodes when the parent is
hidden. This fixes the menu entries staying visible after the menu
frame (titlebar) was unmapped. The entire menu now disappears
together, matching X11 behavior where the brother menu closes on
button release.
This commit is contained in:
Levi Neely 2026-05-13 17:32:49 +02:00
parent 0dc38e4d79
commit 1af95d539f
1 changed files with 6 additions and 0 deletions

View File

@ -5389,6 +5389,12 @@ wl_window_unmap(WNativeWindow win)
struct wl_frame_buf *fb = frame_buf_find(win);
if (fb && fb->scene_buf) {
wlr_scene_node_set_enabled(&fb->scene_buf->node, false);
/* Also hide children */
struct wl_frame_buf *child;
wl_list_for_each(child, &wl_state.frame_list, link) {
if (child->parent_id == win && child->scene_buf)
wlr_scene_node_set_enabled(&child->scene_buf->node, false);
}
return;
}
}