aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index d62a0667..bc968edc 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -37,6 +37,14 @@
bool view_init(struct sway_view *view, enum sway_view_type type,
const struct sway_view_impl *impl) {
+ bool failed = false;
+ view->scene_tree = alloc_scene_tree(root->staging, &failed);
+ view->content_tree = alloc_scene_tree(view->scene_tree, &failed);
+ if (failed) {
+ wlr_scene_node_destroy(&view->scene_tree->node);
+ return false;
+ }
+
view->type = type;
view->impl = impl;
view->executed_criteria = create_list();
@@ -67,7 +75,7 @@ void view_destroy(struct sway_view *view) {
list_free(view->executed_criteria);
view_assign_ctx(view, NULL);
-
+ wlr_scene_node_destroy(&view->scene_tree->node);
free(view->title_format);
if (view->impl->destroy) {