From 66d96d244c589840de6addc6eae1ebfb3101b12f Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Sat, 3 Aug 2024 13:16:32 -0400 Subject: [PATCH] wlr_scene: Ensure scene_node_update is updating entire node. The old logic might not update the entire scene node when a node is disabled. It would only consider the damage last time (the damage was based on the visible region of the node). It's important that we update the entire node region because xwayland stacking will depend on this. --- types/scene/wlr_scene.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 2e2c367e..dc1798d0 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -540,13 +540,8 @@ static void scene_node_update(struct wlr_scene_node *node, struct wlr_scene *scene = scene_node_get_root(node); int x, y; - if (!wlr_scene_node_coords(node, &x, &y)) { - if (damage) { - scene_update_region(scene, damage); - scene_damage_outputs(scene, damage); - pixman_region32_fini(damage); - } - + bool enabled = wlr_scene_node_coords(node, &x, &y); + if (!enabled && !damage) { return; } @@ -565,7 +560,10 @@ static void scene_node_update(struct wlr_scene_node *node, scene_update_region(scene, &update_region); pixman_region32_fini(&update_region); - scene_node_visibility(node, damage); + if (enabled) { + scene_node_visibility(node, damage); + } + scene_damage_outputs(scene, damage); pixman_region32_fini(damage); }