diff options
author | emersion <contact@emersion.fr> | 2018-04-04 00:26:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-04 00:26:31 -0400 |
commit | dee71871d7a37cfa1e53f3f1f60e6e93d21beda4 (patch) | |
tree | 1565ba1fede2da35b170353f895c34205216dc38 /sway/commands/kill.c | |
parent | 3ea7d2d10ed0d6d68e5bf3dd4efac765eb2b0212 (diff) | |
parent | 62c79ef4510d4687e35deab177cf5114a138261f (diff) | |
download | sway-dee71871d7a37cfa1e53f3f1f60e6e93d21beda4.tar.xz |
Merge pull request #1702 from acrisci/split-containers2
properly close container containers
Diffstat (limited to 'sway/commands/kill.c')
-rw-r--r-- | sway/commands/kill.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sway/commands/kill.c b/sway/commands/kill.c index 46d6e98e..f3fa52f1 100644 --- a/sway/commands/kill.c +++ b/sway/commands/kill.c @@ -10,22 +10,7 @@ struct cmd_results *cmd_kill(int argc, char **argv) { struct sway_container *con = config->handler_context.current_container; - switch (con->type) { - case C_ROOT: - case C_OUTPUT: - case C_WORKSPACE: - case C_TYPES: - return cmd_results_new(CMD_INVALID, NULL, - "Can only kill views and containers with this command"); - break; - case C_CONTAINER: - con = container_destroy(con); - arrange_windows(con, -1, -1); - break; - case C_VIEW: - view_close(con->sway_view); - break; - } + container_close(con); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } |