diff options
Diffstat (limited to 'sway/focus.c')
-rw-r--r-- | sway/focus.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sway/focus.c b/sway/focus.c index 45ec43e9..6583f802 100644 --- a/sway/focus.c +++ b/sway/focus.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include "border.h" | 10 | #include "border.h" |
11 | 11 | ||
12 | bool locked_container_focus = false; | 12 | bool locked_container_focus = false; |
13 | bool locked_view_focus = false; | ||
14 | bool suspend_workspace_cleanup = false; | 13 | bool suspend_workspace_cleanup = false; |
15 | 14 | ||
16 | // switches parent focus to c. will switch it accordingly | 15 | // switches parent focus to c. will switch it accordingly |
@@ -151,12 +150,9 @@ bool set_focused_container(swayc_t *c) { | |||
151 | wlc_view_set_state(c->handle, WLC_BIT_ACTIVATED, true); | 150 | wlc_view_set_state(c->handle, WLC_BIT_ACTIVATED, true); |
152 | } | 151 | } |
153 | // set focus if view_focus is unlocked | 152 | // set focus if view_focus is unlocked |
154 | if (!locked_view_focus) { | 153 | wlc_view_focus(c->handle); |
155 | wlc_view_focus(c->handle); | 154 | if (c->parent->layout != L_TABBED && c->parent->layout != L_STACKED) { |
156 | if (c->parent->layout != L_TABBED | 155 | update_container_border(c); |
157 | && c->parent->layout != L_STACKED) { | ||
158 | update_container_border(c); | ||
159 | } | ||
160 | } | 156 | } |
161 | 157 | ||
162 | // rearrange if parent container is tabbed/stacked | 158 | // rearrange if parent container is tabbed/stacked |
@@ -167,10 +163,8 @@ bool set_focused_container(swayc_t *c) { | |||
167 | } | 163 | } |
168 | } else if (c->type == C_WORKSPACE) { | 164 | } else if (c->type == C_WORKSPACE) { |
169 | // remove previous focus if view_focus is unlocked | 165 | // remove previous focus if view_focus is unlocked |
170 | if (!locked_view_focus) { | 166 | update_container_border(c); |
171 | update_container_border(c); | 167 | wlc_view_focus(0); |
172 | wlc_view_focus(0); | ||
173 | } | ||
174 | } | 168 | } |
175 | 169 | ||
176 | if (active_ws != workspace) { | 170 | if (active_ws != workspace) { |