Implement focus child command

The `focus child` command focuses the child container within the selected
container.
This commit is contained in:
Tony Crisci 2016-07-27 22:42:45 -04:00
parent 6d2b455727
commit 88b7cbe314
5 changed files with 12 additions and 5 deletions

View file

@ -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) {