wlr_scene: Update outputs when node is disabled

This commit is contained in:
Alexander Orzechowski 2026-01-07 12:11:28 -05:00
parent 56eb27ab0b
commit ef19f52ca9

View file

@ -666,7 +666,8 @@ static void scene_update_region(struct wlr_scene *scene,
pixman_region32_fini(&visible); pixman_region32_fini(&visible);
} }
static void scene_node_cleanup_when_disabled(struct wlr_scene_node *node, bool xwayland_restack) { static void scene_node_cleanup_when_disabled(struct wlr_scene_node *node,
bool xwayland_restack, struct wl_list *outputs) {
if (node->type == WLR_SCENE_NODE_TREE) { if (node->type == WLR_SCENE_NODE_TREE) {
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;
@ -675,11 +676,14 @@ static void scene_node_cleanup_when_disabled(struct wlr_scene_node *node, bool x
continue; continue;
} }
scene_node_cleanup_when_disabled(child, xwayland_restack); scene_node_cleanup_when_disabled(child, xwayland_restack, outputs);
} }
return; return;
} }
pixman_region32_clear(&node->visible);
update_node_update_outputs(node, outputs, NULL, NULL);
#if WLR_HAS_XWAYLAND #if WLR_HAS_XWAYLAND
if (xwayland_restack) { if (xwayland_restack) {
struct wlr_xwayland_surface *xwayland_surface = struct wlr_xwayland_surface *xwayland_surface =
@ -699,7 +703,7 @@ static void scene_node_update(struct wlr_scene_node *node,
int x, y; int x, y;
if (!wlr_scene_node_coords(node, &x, &y)) { if (!wlr_scene_node_coords(node, &x, &y)) {
scene_node_cleanup_when_disabled(node, scene->restack_xwayland_surfaces); scene_node_cleanup_when_disabled(node, scene->restack_xwayland_surfaces, &scene->outputs);
if (damage) { if (damage) {
scene_update_region(scene, damage); scene_update_region(scene, damage);