aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/kill.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-01-20 16:21:45 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-01-20 16:21:45 -0500
commit6a1d71b8b8f33bdea3fb41bcd0de9439c0452682 (patch)
tree3ebbb611bb34864f9e86ceed87b6e32c73b93f84 /sway/commands/kill.c
parentadd kill command (diff)
downloadsway-6a1d71b8b8f33bdea3fb41bcd0de9439c0452682.tar.gz
sway-6a1d71b8b8f33bdea3fb41bcd0de9439c0452682.tar.zst
sway-6a1d71b8b8f33bdea3fb41bcd0de9439c0452682.zip
basic command criteria
Diffstat (limited to 'sway/commands/kill.c')
-rw-r--r--sway/commands/kill.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/commands/kill.c b/sway/commands/kill.c
index 4bbf94e5..f0e3722a 100644
--- a/sway/commands/kill.c
+++ b/sway/commands/kill.c
@@ -15,7 +15,13 @@ struct cmd_results *cmd_kill(int argc, char **argv) {
15 return cmd_results_new(CMD_FAILURE, NULL, "no seat context given"); 15 return cmd_results_new(CMD_FAILURE, NULL, "no seat context given");
16 } 16 }
17 17
18 struct sway_view *view = seat->focus->sway_view; 18 struct sway_view *view = NULL;
19
20 if (config->handler_context.current_container) {
21 view = config->handler_context.current_container->sway_view;
22 } else {
23 view = seat->focus->sway_view;
24 }
19 25
20 if (view->iface.close) { 26 if (view->iface.close) {
21 view->iface.close(view); 27 view->iface.close(view);