aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2016-03-04 22:53:23 +0100
committerFurkan Sahin <furkan-dev@proton.me>2016-03-04 22:53:23 +0100
commit7a87f8f4db35b83507228a21ceaf84ffd72e160b (patch)
tree6f75ebc9d7e8763fff30fbdfd77576de58cf30a6
parenta8f577076f4d87090b06adf6662e4adb88389be1 (diff)
Remove focus when switching to empty workspace
Fix #504
-rw-r--r--sway/focus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/focus.c b/sway/focus.c
index c2ded212..7f96eda7 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -139,6 +139,11 @@ bool set_focused_container(swayc_t *c) {
wlc_view_focus(p->handle);
}
}
+ } else if (p->type == C_WORKSPACE) {
+ // remove previous focus if view_focus is unlocked
+ if (!locked_view_focus) {
+ wlc_view_focus(0);
+ }
}
if (active_ws != workspace) {