summaryrefslogtreecommitdiffstats
path: root/sway/focus.c
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-20 00:22:15 +0200
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-25 00:00:49 +0200
commit3e1f78ab26e8bc6b6cefd53ee137e97533c2695e (patch)
treef158bcae9fce9af29a35bd3ec0e32b81bff87662 /sway/focus.c
parentUse tabs for indentation (diff)
downloadsway-3e1f78ab26e8bc6b6cefd53ee137e97533c2695e.tar.gz
sway-3e1f78ab26e8bc6b6cefd53ee137e97533c2695e.tar.zst
sway-3e1f78ab26e8bc6b6cefd53ee137e97533c2695e.zip
Add support for nested tabbed/stacked containers
Diffstat (limited to 'sway/focus.c')
-rw-r--r--sway/focus.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/focus.c b/sway/focus.c
index 8ce22456..b4dfc423 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -149,8 +149,9 @@ bool set_focused_container(swayc_t *c) {
149 } 149 }
150 150
151 // rearrange if parent container is tabbed/stacked 151 // rearrange if parent container is tabbed/stacked
152 if (swayc_is_tabbed_stacked(p)) { 152 swayc_t *parent = swayc_tabbed_stacked_parent(p);
153 arrange_windows(p->parent, -1, -1); 153 if (parent != NULL) {
154 arrange_windows(parent, -1, -1);
154 } 155 }
155 } else if (p->type == C_WORKSPACE) { 156 } else if (p->type == C_WORKSPACE) {
156 // remove previous focus if view_focus is unlocked 157 // remove previous focus if view_focus is unlocked