aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/exit.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-12 20:19:54 -0400
committerDrew DeVault <sir@cmpwn.com>2018-04-12 20:19:54 -0400
commitcd1b32453a9296c18b28bff71607aeb22987b5cd (patch)
treec653c6d525b471914c01a9d7ae543f521b6138ed /sway/commands/exit.c
parent8e06985cc1b479724446fba752e0fecfb998e87b (diff)
parent5785170421dc38437acde8bb61068cd16fda716c (diff)
Merge branch 'wlroots'
Diffstat (limited to 'sway/commands/exit.c')
-rw-r--r--sway/commands/exit.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sway/commands/exit.c b/sway/commands/exit.c
index f192f86a..d5353c20 100644
--- a/sway/commands/exit.c
+++ b/sway/commands/exit.c
@@ -1,17 +1,14 @@
+#include <stddef.h>
#include "sway/commands.h"
-#include "sway/container.h"
+#include "sway/config.h"
void sway_terminate(int exit_code);
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.");
if ((error = checkarg(argc, "exit", EXPECTED_EQUAL_TO, 0))) {
return error;
}
- // Close all views
- close_views(&root_container);
- sway_terminate(EXIT_SUCCESS);
+ sway_terminate(0);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
-