diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-04 22:53:23 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-05 15:39:28 +0100 |
commit | eb82a500c80a942ba4ff8cbb6750ad5d6d6f98c4 (patch) | |
tree | 6f75ebc9d7e8763fff30fbdfd77576de58cf30a6 | |
parent | Merge pull request #502 from mikkeloscar/lock-reset-input (diff) | |
download | sway-eb82a500c80a942ba4ff8cbb6750ad5d6d6f98c4.tar.gz sway-eb82a500c80a942ba4ff8cbb6750ad5d6d6f98c4.tar.zst sway-eb82a500c80a942ba4ff8cbb6750ad5d6d6f98c4.zip |
Remove focus when switching to empty workspace
Fix #504
-rw-r--r-- | sway/focus.c | 5 |
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) { | |||
139 | wlc_view_focus(p->handle); | 139 | wlc_view_focus(p->handle); |
140 | } | 140 | } |
141 | } | 141 | } |
142 | } else if (p->type == C_WORKSPACE) { | ||
143 | // remove previous focus if view_focus is unlocked | ||
144 | if (!locked_view_focus) { | ||
145 | wlc_view_focus(0); | ||
146 | } | ||
142 | } | 147 | } |
143 | 148 | ||
144 | if (active_ws != workspace) { | 149 | if (active_ws != workspace) { |