aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/kill.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/kill.c')
-rw-r--r--sway/commands/kill.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sway/commands/kill.c b/sway/commands/kill.c
index cebf7f3c..f408ce2a 100644
--- a/sway/commands/kill.c
+++ b/sway/commands/kill.c
@@ -6,15 +6,12 @@
6#include "sway/commands.h" 6#include "sway/commands.h"
7 7
8struct cmd_results *cmd_kill(int argc, char **argv) { 8struct cmd_results *cmd_kill(int argc, char **argv) {
9 if (config->reading) {
10 return cmd_results_new(CMD_FAILURE, "kill",
11 "Command 'kill' cannot be used in the config file");
12 }
13 enum swayc_types type = config->handler_context.current_container->type; 9 enum swayc_types type = config->handler_context.current_container->type;
14 if (type != C_VIEW || type != C_CONTAINER) { 10 if (type != C_VIEW && type != C_CONTAINER) {
15 return cmd_results_new(CMD_INVALID, NULL, 11 return cmd_results_new(CMD_INVALID, NULL,
16 "Can only kill views and containers with this command"); 12 "Can only kill views and containers with this command");
17 } 13 }
14
18 // TODO close arbitrary containers without a view 15 // TODO close arbitrary containers without a view
19 struct sway_view *view = 16 struct sway_view *view =
20 config->handler_context.current_container->sway_view; 17 config->handler_context.current_container->sway_view;