From 88b7cbe314aaefc9cc96884a655a2d9aea84ee0a Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Wed, 27 Jul 2016 22:42:45 -0400 Subject: Implement `focus child` command The `focus child` command focuses the child container within the selected container. --- sway/layout.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sway/layout.c') diff --git a/sway/layout.c b/sway/layout.c index 1d5944f8..cd5a31bc 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -1009,6 +1009,10 @@ static swayc_t *get_swayc_in_output_direction(swayc_t *output, enum movement_dir } swayc_t *get_swayc_in_direction_under(swayc_t *container, enum movement_direction dir, swayc_t *limit) { + if (dir == MOVE_CHILD) { + return container->focused; + } + swayc_t *parent = container->parent; if (dir == MOVE_PARENT) { if (parent->type == C_OUTPUT) { -- cgit v1.2.3