wlr_scene: Don't recurse when disabling scene node if a child is already disabled

If a child is disabled, that means the node already went through the
rigamarole of cleaning up its state. Don't do it again.
This commit is contained in:
Alexander Orzechowski 2026-01-07 12:06:54 -05:00
parent edc12e81d9
commit 56eb27ab0b

View file

@ -671,6 +671,10 @@ static void scene_node_cleanup_when_disabled(struct wlr_scene_node *node, bool x
struct wlr_scene_tree *scene_tree = wlr_scene_tree_from_node(node); struct wlr_scene_tree *scene_tree = wlr_scene_tree_from_node(node);
struct wlr_scene_node *child; struct wlr_scene_node *child;
wl_list_for_each(child, &scene_tree->children, link) { wl_list_for_each(child, &scene_tree->children, link) {
if (!child->enabled) {
continue;
}
scene_node_cleanup_when_disabled(child, xwayland_restack); scene_node_cleanup_when_disabled(child, xwayland_restack);
} }
return; return;