aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-12-29 08:22:32 -0500
committerDrew DeVault <sir@cmpwn.com>2015-12-29 08:22:32 -0500
commit5292860b9202336d721089ecc9b0f3906aa47a33 (patch)
tree2ff85443a9587546176620d722028af59388d0da /sway/commands.c
parentd409620a55c0552d47a75502a35e7c8bde60685d (diff)
parent16b8c2e915fb7972ad5190ae2591b2d71789f477 (diff)
Merge pull request #418 from mikkeloscar/sway-handle-sigterm
Handle SIGTERM sent to sway
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 0955db38..fe341cd5 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -318,12 +318,6 @@ static struct cmd_results *cmd_exec(int argc, char **argv) {
return cmd_exec_always(argc, argv);
}
-static void kill_views(swayc_t *container, void *data) {
- if (container->type == C_VIEW) {
- wlc_view_close(container->handle);
- }
-}
-
static struct cmd_results *cmd_exit(int argc, char **argv) {
struct cmd_results *error = NULL;
if (config->reading) return cmd_results_new(CMD_FAILURE, "exit", "Can't be used in config file.");
@@ -331,7 +325,7 @@ static struct cmd_results *cmd_exit(int argc, char **argv) {
return error;
}
// Close all views
- container_map(&root_container, kill_views, NULL);
+ close_views(&root_container);
sway_terminate();
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}