mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
Remove dead global locked_view_focus
The value of `locked_view_focus` is always false. Remove dead code associated with this variable to simplify things.
This commit is contained in:
parent
2d907ef1f6
commit
2f65100bee
3 changed files with 5 additions and 18 deletions
16
sway/focus.c
16
sway/focus.c
|
|
@ -10,7 +10,6 @@
|
|||
#include "border.h"
|
||||
|
||||
bool locked_container_focus = false;
|
||||
bool locked_view_focus = false;
|
||||
bool suspend_workspace_cleanup = false;
|
||||
|
||||
// switches parent focus to c. will switch it accordingly
|
||||
|
|
@ -151,12 +150,9 @@ bool set_focused_container(swayc_t *c) {
|
|||
wlc_view_set_state(c->handle, WLC_BIT_ACTIVATED, true);
|
||||
}
|
||||
// set focus if view_focus is unlocked
|
||||
if (!locked_view_focus) {
|
||||
wlc_view_focus(c->handle);
|
||||
if (c->parent->layout != L_TABBED
|
||||
&& c->parent->layout != L_STACKED) {
|
||||
update_container_border(c);
|
||||
}
|
||||
wlc_view_focus(c->handle);
|
||||
if (c->parent->layout != L_TABBED && c->parent->layout != L_STACKED) {
|
||||
update_container_border(c);
|
||||
}
|
||||
|
||||
// rearrange if parent container is tabbed/stacked
|
||||
|
|
@ -167,10 +163,8 @@ bool set_focused_container(swayc_t *c) {
|
|||
}
|
||||
} else if (c->type == C_WORKSPACE) {
|
||||
// remove previous focus if view_focus is unlocked
|
||||
if (!locked_view_focus) {
|
||||
update_container_border(c);
|
||||
wlc_view_focus(0);
|
||||
}
|
||||
update_container_border(c);
|
||||
wlc_view_focus(0);
|
||||
}
|
||||
|
||||
if (active_ws != workspace) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue