summaryrefslogtreecommitdiffstats
path: root/sway/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/layout.c')
-rw-r--r--sway/layout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/layout.c b/sway/layout.c
index cd47037b..ed9479ab 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -151,7 +151,9 @@ swayc_t *remove_child(swayc_t *child) {
151 // Set focused to new container 151 // Set focused to new container
152 if (parent->focused == child) { 152 if (parent->focused == child) {
153 if (parent->children->length > 0) { 153 if (parent->children->length > 0) {
154 parent->focused = parent->children->items[i?i-1:0]; 154 parent->focused = parent->children->items[i ? i-1:0];
155 } else if (parent->floating && parent->floating->length) {
156 parent->focused = parent->floating->items[parent->floating->length - 1];
155 } else { 157 } else {
156 parent->focused = NULL; 158 parent->focused = NULL;
157 } 159 }