aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/scene/subsurface_tree.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/types/scene/subsurface_tree.c b/types/scene/subsurface_tree.c
index 7cfa8828..cd8d23dc 100644
--- a/types/scene/subsurface_tree.c
+++ b/types/scene/subsurface_tree.c
@@ -22,7 +22,10 @@ struct wlr_scene_subsurface_tree {
struct wl_listener surface_new_subsurface;
};
-static void subsurface_tree_destroy(struct wlr_scene_subsurface_tree *subsurface_tree) {
+static void subsurface_tree_handle_tree_destroy(struct wl_listener *listener,
+ void *data) {
+ struct wlr_scene_subsurface_tree *subsurface_tree =
+ wl_container_of(listener, subsurface_tree, tree_destroy);
// tree and scene_surface will be cleaned up by scene_node_finish
if (subsurface_tree->parent) {
wlr_addon_finish(&subsurface_tree->surface_addon);
@@ -34,13 +37,6 @@ static void subsurface_tree_destroy(struct wlr_scene_subsurface_tree *subsurface
free(subsurface_tree);
}
-static void subsurface_tree_handle_tree_destroy(struct wl_listener *listener,
- void *data) {
- struct wlr_scene_subsurface_tree *subsurface_tree =
- wl_container_of(listener, subsurface_tree, tree_destroy);
- subsurface_tree_destroy(subsurface_tree);
-}
-
static void subsurface_tree_handle_surface_destroy(struct wl_listener *listener,
void *data) {
struct wlr_scene_subsurface_tree *subsurface_tree =