summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-08-18 22:20:31 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-08-18 22:20:31 -0700
commit6dc1ae802bb8cf1c272dc48c68fb42e3d548e812 (patch)
treed28509330a0b34a7672221a9d3719d81c0a0c913
parentFixed full screen workspace switch focusing (diff)
downloadsway-6dc1ae802bb8cf1c272dc48c68fb42e3d548e812.tar.gz
sway-6dc1ae802bb8cf1c272dc48c68fb42e3d548e812.tar.zst
sway-6dc1ae802bb8cf1c272dc48c68fb42e3d548e812.zip
focus to only child
-rw-r--r--sway/layout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 2f8027a8..e2e12901 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -33,6 +33,9 @@ void add_child(swayc_t *parent, swayc_t *child) {
33 child->width, child->height, parent, parent->type, parent->width, parent->height); 33 child->width, child->height, parent, parent->type, parent->width, parent->height);
34 list_add(parent->children, child); 34 list_add(parent->children, child);
35 child->parent = parent; 35 child->parent = parent;
36 if (parent->children->length == 1) {
37 parent->focused = child;
38 }
36} 39}
37 40
38swayc_t *add_sibling(swayc_t *sibling, swayc_t *child) { 41swayc_t *add_sibling(swayc_t *sibling, swayc_t *child) {