summaryrefslogtreecommitdiff
path: root/sway/focus.c
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <[email protected]>2016-04-01 00:04:08 +0200
committerMikkel Oscar Lyderik <[email protected]>2016-04-25 00:00:49 +0200
commitec7ff769c7b4da616ebe6bfd90b70350dd39e166 (patch)
tree7a6452e1d9ae7da06f5b846cf819a2db8d161cf0 /sway/focus.c
parent7efa9ab34ae1dabcc7c87d22bfba0b1312c8c662 (diff)
Tabbed and stacked layout
Diffstat (limited to 'sway/focus.c')
-rw-r--r--sway/focus.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/focus.c b/sway/focus.c
index cdc9a888..8acdc772 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -141,9 +141,17 @@ bool set_focused_container(swayc_t *c) {
// set focus if view_focus is unlocked
if (!locked_view_focus) {
wlc_view_focus(p->handle);
- update_view_border(p);
+ if (p->parent->layout != L_TABBED
+ && p->parent->layout != L_STACKED) {
+ update_view_border(p);
+ }
}
}
+
+ // rearrange if parent container is tabbed/stacked
+ if (p->parent->layout == L_TABBED || p->parent->layout == L_STACKED) {
+ arrange_windows(p->parent, -1, -1);
+ }
} else if (p->type == C_WORKSPACE) {
// remove previous focus if view_focus is unlocked
if (!locked_view_focus) {