aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-07-28 07:26:37 -0400
committerLibravatar GitHub <noreply@github.com>2016-07-28 07:26:37 -0400
commitee67c5bee34c4a98f8df3db68e92eaa55f1d579d (patch)
tree42bb6aced0f15f2d3f5ae4f5da02c1a9d6083dac /sway/commands.c
parentMerge pull request #792 from acrisci/feature/render-focused-stack-children-fo... (diff)
parentImplement `focus child` command (diff)
downloadsway-ee67c5bee34c4a98f8df3db68e92eaa55f1d579d.tar.gz
sway-ee67c5bee34c4a98f8df3db68e92eaa55f1d579d.tar.zst
sway-ee67c5bee34c4a98f8df3db68e92eaa55f1d579d.zip
Merge pull request #791 from acrisci/feature/focus-child0.9-rc1
Implement `focus child` command
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index c78c2660..d572afa0 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -864,6 +864,8 @@ static struct cmd_results *cmd_focus(int argc, char **argv) {
864 move_focus(MOVE_DOWN); 864 move_focus(MOVE_DOWN);
865 } else if (strcasecmp(argv[0], "parent") == 0) { 865 } else if (strcasecmp(argv[0], "parent") == 0) {
866 move_focus(MOVE_PARENT); 866 move_focus(MOVE_PARENT);
867 } else if (strcasecmp(argv[0], "child") == 0) {
868 move_focus(MOVE_CHILD);
867 } else if (strcasecmp(argv[0], "mode_toggle") == 0) { 869 } else if (strcasecmp(argv[0], "mode_toggle") == 0) {
868 int i; 870 int i;
869 swayc_t *workspace = swayc_active_workspace(); 871 swayc_t *workspace = swayc_active_workspace();
@@ -903,7 +905,7 @@ static struct cmd_results *cmd_focus(int argc, char **argv) {
903 } 905 }
904 } else { 906 } else {
905 return cmd_results_new(CMD_INVALID, "focus", 907 return cmd_results_new(CMD_INVALID, "focus",
906 "Expected 'focus <direction|parent|mode_toggle>' or 'focus output <direction|name>'"); 908 "Expected 'focus <direction|parent|child|mode_toggle>' or 'focus output <direction|name>'");
907 } 909 }
908 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 910 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
909} 911}