aboutsummaryrefslogtreecommitdiff
path: root/sway/layout.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-07-28 07:26:37 -0400
committerGitHub <noreply@github.com>2016-07-28 07:26:37 -0400
commitee67c5bee34c4a98f8df3db68e92eaa55f1d579d (patch)
tree42bb6aced0f15f2d3f5ae4f5da02c1a9d6083dac /sway/layout.c
parentd03266a77a3a07a8a7488bb425410a87a658d9b0 (diff)
parent88b7cbe314aaefc9cc96884a655a2d9aea84ee0a (diff)
Merge pull request #791 from acrisci/feature/focus-child
Implement `focus child` command
Diffstat (limited to 'sway/layout.c')
-rw-r--r--sway/layout.c4
1 files changed, 4 insertions, 0 deletions
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) {