aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-08 17:43:49 +0100
committerAlexander Orzechowski <alex@ozal.ski>2022-11-08 16:47:59 +0000
commit440d7fa072d392ca076f73d5de469cb165d2499a (patch)
treef2fe0b47db71dbd88784f71a5e71fa31c7a74be4
parent24c149fefb2bf7c962c13c7f39b8e75905ef1f22 (diff)
scene: destroy addons before cleaning up internal state
This allows addons to access wlr_scene_node/wlr_scene_surface fields to clean up themselves.
-rw-r--r--types/scene/wlr_scene.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c
index 1be2d131..0eed5884 100644
--- a/types/scene/wlr_scene.c
+++ b/types/scene/wlr_scene.c
@@ -87,6 +87,7 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
// in case the destroy signal would like to remove children before they
// are recursively destroyed.
wl_signal_emit_mutable(&node->events.destroy, NULL);
+ wlr_addon_set_finish(&node->addons);
wlr_scene_node_set_enabled(node, false);
@@ -130,7 +131,6 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
}
}
- wlr_addon_set_finish(&node->addons);
wl_list_remove(&node->link);
pixman_region32_fini(&node->visible);
free(node);