aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-31 13:20:05 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-31 15:37:16 -0400
commite7ecb001d70c71f799547d15cd45c235412af402 (patch)
treea14ba05280f3c8b21f96b546509d5ce78b47b8ac /sway
parenttemporarily add LD_LIBRARY_PATH stuff (diff)
downloadsway-e7ecb001d70c71f799547d15cd45c235412af402.tar.gz
sway-e7ecb001d70c71f799547d15cd45c235412af402.tar.zst
sway-e7ecb001d70c71f799547d15cd45c235412af402.zip
reap container parent on destroy
Diffstat (limited to 'sway')
-rw-r--r--sway/commands/kill.c1
-rw-r--r--sway/tree/container.c7
2 files changed, 6 insertions, 2 deletions
diff --git a/sway/commands/kill.c b/sway/commands/kill.c
index 80120832..e6036cb3 100644
--- a/sway/commands/kill.c
+++ b/sway/commands/kill.c
@@ -19,7 +19,6 @@ struct cmd_results *cmd_kill(int argc, char **argv) {
19 break; 19 break;
20 case C_CONTAINER: 20 case C_CONTAINER:
21 con = container_destroy(con); 21 con = container_destroy(con);
22 con = container_reap_empty(con);
23 arrange_windows(con, -1, -1); 22 arrange_windows(con, -1, -1);
24 break; 23 break;
25 case C_VIEW: 24 case C_VIEW:
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 7b88cccb..f972ac24 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -58,7 +58,7 @@ struct sway_container *container_create(enum sway_container_type type) {
58 return c; 58 return c;
59} 59}
60 60
61struct sway_container *container_destroy(struct sway_container *cont) { 61static struct sway_container *_container_destroy(struct sway_container *cont) {
62 if (cont == NULL) { 62 if (cont == NULL) {
63 return NULL; 63 return NULL;
64 } 64 }
@@ -89,6 +89,11 @@ struct sway_container *container_destroy(struct sway_container *cont) {
89 return parent; 89 return parent;
90} 90}
91 91
92struct sway_container *container_destroy(struct sway_container *cont) {
93 cont = _container_destroy(cont);
94 return container_reap_empty(cont->parent);
95}
96
92struct sway_container *container_output_create( 97struct sway_container *container_output_create(
93 struct sway_output *sway_output) { 98 struct sway_output *sway_output) {
94 struct wlr_box size; 99 struct wlr_box size;