aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 18:17:03 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 18:17:03 -0400
commite5491bf4981934736b43e239404550c3b66bb1f4 (patch)
tree5843c0aa17da8c056a4f624ccd6d6572db86cbce /sway
parentrename layout init (diff)
downloadsway-e5491bf4981934736b43e239404550c3b66bb1f4.tar.gz
sway-e5491bf4981934736b43e239404550c3b66bb1f4.tar.zst
sway-e5491bf4981934736b43e239404550c3b66bb1f4.zip
rename container destroy func
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/container.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index b41626e1..b343d236 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -58,18 +58,18 @@ static struct sway_container *new_swayc(enum sway_container_type type) {
58 return c; 58 return c;
59} 59}
60 60
61static void free_swayc(struct sway_container *cont) { 61static void container_destroy(struct sway_container *cont) {
62 if (!sway_assert(cont, "free_swayc passed NULL")) { 62 if (cont == NULL) {
63 return; 63 return;
64 } 64 }
65 65
66 wl_signal_emit(&cont->events.destroy, cont); 66 wl_signal_emit(&cont->events.destroy, cont);
67 67
68 if (cont->children) { 68 if (cont->children) {
69 // remove children until there are no more, free_swayc calls 69 // remove children until there are no more, container_destroy calls
70 // container_remove_child, which removes child from this container 70 // container_remove_child, which removes child from this container
71 while (cont->children->length) { 71 while (cont->children->length) {
72 free_swayc(cont->children->items[0]); 72 container_destroy(cont->children->items[0]);
73 } 73 }
74 list_free(cont->children); 74 list_free(cont->children);
75 } 75 }
@@ -125,7 +125,7 @@ struct sway_container *container_output_create(struct sway_output *sway_output)
125 output->sway_output = sway_output; 125 output->sway_output = sway_output;
126 output->name = strdup(name); 126 output->name = strdup(name);
127 if (output->name == NULL) { 127 if (output->name == NULL) {
128 free_swayc(output); 128 container_destroy(output);
129 return NULL; 129 return NULL;
130 } 130 }
131 131
@@ -224,7 +224,7 @@ struct sway_container *container_output_destroy(struct sway_container *output) {
224 wl_list_remove(&output->sway_output->mode.link); 224 wl_list_remove(&output->sway_output->mode.link);
225 225
226 wlr_log(L_DEBUG, "OUTPUT: Destroying output '%s'", output->name); 226 wlr_log(L_DEBUG, "OUTPUT: Destroying output '%s'", output->name);
227 free_swayc(output); 227 container_destroy(output);
228 228
229 return &root_container; 229 return &root_container;
230} 230}
@@ -235,7 +235,7 @@ struct sway_container *container_view_destroy(struct sway_container *view) {
235 } 235 }
236 wlr_log(L_DEBUG, "Destroying view '%s'", view->name); 236 wlr_log(L_DEBUG, "Destroying view '%s'", view->name);
237 struct sway_container *parent = view->parent; 237 struct sway_container *parent = view->parent;
238 free_swayc(view); 238 container_destroy(view);
239 239
240 // TODO WLR: Destroy empty containers 240 // TODO WLR: Destroy empty containers
241 /* 241 /*