summaryrefslogtreecommitdiffstats
path: root/sway/layout.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2016-07-27 22:42:45 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2016-07-27 22:48:46 -0400
commit88b7cbe314aaefc9cc96884a655a2d9aea84ee0a (patch)
tree293bdbf27966b01a31574f40eb83f4b6ab834ba1 /sway/layout.c
parentMerge pull request #790 from acrisci/bug/switch-focus-workspace-output (diff)
downloadsway-88b7cbe314aaefc9cc96884a655a2d9aea84ee0a.tar.gz
sway-88b7cbe314aaefc9cc96884a655a2d9aea84ee0a.tar.zst
sway-88b7cbe314aaefc9cc96884a655a2d9aea84ee0a.zip
Implement `focus child` command
The `focus child` command focuses the child container within the selected container.
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
1009} 1009}
1010 1010
1011swayc_t *get_swayc_in_direction_under(swayc_t *container, enum movement_direction dir, swayc_t *limit) { 1011swayc_t *get_swayc_in_direction_under(swayc_t *container, enum movement_direction dir, swayc_t *limit) {
1012 if (dir == MOVE_CHILD) {
1013 return container->focused;
1014 }
1015
1012 swayc_t *parent = container->parent; 1016 swayc_t *parent = container->parent;
1013 if (dir == MOVE_PARENT) { 1017 if (dir == MOVE_PARENT) {
1014 if (parent->type == C_OUTPUT) { 1018 if (parent->type == C_OUTPUT) {