aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index eeadc5d8..c06924f5 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -27,8 +27,7 @@ void view_destroy(struct sway_view *view) {
27 view_unmap(view); 27 view_unmap(view);
28 } 28 }
29 29
30 container_view_destroy(view->swayc); 30 container_destroy(view->swayc);
31 free(view);
32} 31}
33 32
34const char *view_get_title(struct sway_view *view) { 33const char *view_get_title(struct sway_view *view) {
@@ -78,14 +77,6 @@ void view_close(struct sway_view *view) {
78 } 77 }
79} 78}
80 79
81void container_view_destroy(struct sway_container *view) {
82 if (!view) {
83 return;
84 }
85 wlr_log(L_DEBUG, "Destroying view '%s'", view->name);
86 container_destroy(view);
87}
88
89void view_damage_whole(struct sway_view *view) { 80void view_damage_whole(struct sway_view *view) {
90 for (int i = 0; i < root_container.children->length; ++i) { 81 for (int i = 0; i < root_container.children->length; ++i) {
91 struct sway_container *cont = root_container.children->items[i]; 82 struct sway_container *cont = root_container.children->items[i];
@@ -158,7 +149,7 @@ void view_unmap(struct sway_view *view) {
158 149
159 view_damage_whole(view); 150 view_damage_whole(view);
160 151
161 container_view_destroy(view->swayc); 152 container_destroy(view->swayc);
162 153
163 view->swayc = NULL; 154 view->swayc = NULL;
164 view->surface = NULL; 155 view->surface = NULL;