diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-31 13:20:05 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-03-31 15:37:16 -0400 |
commit | e7ecb001d70c71f799547d15cd45c235412af402 (patch) | |
tree | a14ba05280f3c8b21f96b546509d5ce78b47b8ac | |
parent | temporarily add LD_LIBRARY_PATH stuff (diff) | |
download | sway-e7ecb001d70c71f799547d15cd45c235412af402.tar.gz sway-e7ecb001d70c71f799547d15cd45c235412af402.tar.zst sway-e7ecb001d70c71f799547d15cd45c235412af402.zip |
reap container parent on destroy
-rw-r--r-- | sway/commands/kill.c | 1 | ||||
-rw-r--r-- | sway/tree/container.c | 7 |
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 | ||
61 | struct sway_container *container_destroy(struct sway_container *cont) { | 61 | static 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 | ||
92 | struct sway_container *container_destroy(struct sway_container *cont) { | ||
93 | cont = _container_destroy(cont); | ||
94 | return container_reap_empty(cont->parent); | ||
95 | } | ||
96 | |||
92 | struct sway_container *container_output_create( | 97 | struct 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; |