aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-01-20 16:21:45 -0500
committerTony Crisci <tony@dubstepdish.com>2018-01-20 16:21:45 -0500
commit6a1d71b8b8f33bdea3fb41bcd0de9439c0452682 (patch)
tree3ebbb611bb34864f9e86ceed87b6e32c73b93f84 /sway/commands
parentc353e01c85049cfbc09510657e453b6aa5fd9c2d (diff)
downloadsway-6a1d71b8b8f33bdea3fb41bcd0de9439c0452682.tar.xz
basic command criteria
Diffstat (limited to 'sway/commands')
-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) {
return cmd_results_new(CMD_FAILURE, NULL, "no seat context given");
}
- struct sway_view *view = seat->focus->sway_view;
+ struct sway_view *view = NULL;
+
+ if (config->handler_context.current_container) {
+ view = config->handler_context.current_container->sway_view;
+ } else {
+ view = seat->focus->sway_view;
+ }
if (view->iface.close) {
view->iface.close(view);