aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/kill.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-02-24 13:22:57 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-02-24 13:22:57 -0500
commit7262bf655f7a19af1d4c8681be74d70bfc6b8911 (patch)
tree2f949def2ad25fff6e642fcbd30d8c9d2bc8db21 /sway/commands/kill.c
parentseparate config directives and commands (diff)
downloadsway-7262bf655f7a19af1d4c8681be74d70bfc6b8911.tar.gz
sway-7262bf655f7a19af1d4c8681be74d70bfc6b8911.tar.zst
sway-7262bf655f7a19af1d4c8681be74d70bfc6b8911.zip
remove checks for command handlers
Diffstat (limited to 'sway/commands/kill.c')
-rw-r--r--sway/commands/kill.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sway/commands/kill.c b/sway/commands/kill.c
index 4b3666be..f408ce2a 100644
--- a/sway/commands/kill.c
+++ b/sway/commands/kill.c
@@ -6,14 +6,6 @@
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 if (config->handler_context.current_container == NULL) {
14 wlr_log(L_DEBUG, "no container to kill");
15 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
16 }
17 enum swayc_types type = config->handler_context.current_container->type; 9 enum swayc_types type = config->handler_context.current_container->type;
18 if (type != C_VIEW && type != C_CONTAINER) { 10 if (type != C_VIEW && type != C_CONTAINER) {
19 return cmd_results_new(CMD_INVALID, NULL, 11 return cmd_results_new(CMD_INVALID, NULL,