diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 8 |
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) { | |||
318 | return cmd_exec_always(argc, argv); | 318 | return cmd_exec_always(argc, argv); |
319 | } | 319 | } |
320 | 320 | ||
321 | static void kill_views(swayc_t *container, void *data) { | ||
322 | if (container->type == C_VIEW) { | ||
323 | wlc_view_close(container->handle); | ||
324 | } | ||
325 | } | ||
326 | |||
327 | static struct cmd_results *cmd_exit(int argc, char **argv) { | 321 | static struct cmd_results *cmd_exit(int argc, char **argv) { |
328 | struct cmd_results *error = NULL; | 322 | struct cmd_results *error = NULL; |
329 | if (config->reading) return cmd_results_new(CMD_FAILURE, "exit", "Can't be used in config file."); | 323 | 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) { | |||
331 | return error; | 325 | return error; |
332 | } | 326 | } |
333 | // Close all views | 327 | // Close all views |
334 | container_map(&root_container, kill_views, NULL); | 328 | close_views(&root_container); |
335 | sway_terminate(); | 329 | sway_terminate(); |
336 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 330 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
337 | } | 331 | } |