From 56eb27ab0b87532649ad6d1a7cc9671f9725f0bd Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Wed, 7 Jan 2026 12:06:54 -0500 Subject: [PATCH] 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. --- types/scene/wlr_scene.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 19f415911..a4f32cff2 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -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_node *child; wl_list_for_each(child, &scene_tree->children, link) { + if (!child->enabled) { + continue; + } + scene_node_cleanup_when_disabled(child, xwayland_restack); } return;