mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-05 04:06:11 -05:00
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:
parent
edc12e81d9
commit
56eb27ab0b
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue