diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c index ed561764..d572afa0 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -864,6 +864,8 @@ static struct cmd_results *cmd_focus(int argc, char **argv) { move_focus(MOVE_DOWN); } else if (strcasecmp(argv[0], "parent") == 0) { move_focus(MOVE_PARENT); + } else if (strcasecmp(argv[0], "child") == 0) { + move_focus(MOVE_CHILD); } else if (strcasecmp(argv[0], "mode_toggle") == 0) { int i; swayc_t *workspace = swayc_active_workspace(); @@ -903,7 +905,7 @@ static struct cmd_results *cmd_focus(int argc, char **argv) { } } else { return cmd_results_new(CMD_INVALID, "focus", - "Expected 'focus <direction|parent|mode_toggle>' or 'focus output <direction|name>'"); + "Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'"); } return cmd_results_new(CMD_SUCCESS, NULL, NULL); } @@ -1925,8 +1927,8 @@ static struct cmd_results *cmd_kill(int argc, char **argv) { if (config->reading) return cmd_results_new(CMD_FAILURE, "kill", "Can't be used in config file."); if (!config->active) return cmd_results_new(CMD_FAILURE, "kill", "Can only be used when sway is running."); - swayc_t *view = get_focused_container(&root_container); - wlc_view_close(view->handle); + swayc_t *container = get_focused_container(&root_container); + close_views(container); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } |