mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
Remove redundant checks.
Now that the focus_magic function is responsible for updating the status-bar when there are no windows, remove superfluous checks from a couple of places that were previously needed. Fixed a typo in a comment while there.
This commit is contained in:
parent
f0280ca20a
commit
9318d27d45
1 changed files with 2 additions and 12 deletions
14
scrotwm.c
14
scrotwm.c
|
@ -2538,13 +2538,8 @@ focus_prev(struct ws_win *win)
|
|||
winfocus = TAILQ_LAST(wl, ws_win_list);
|
||||
if (winfocus == NULL || winfocus == win)
|
||||
winfocus = TAILQ_NEXT(cur_focus, entry);
|
||||
done:
|
||||
if (winfocus == winlostfocus || winfocus == NULL) {
|
||||
/* update the bar so that title/class/name will be cleared. */
|
||||
bar_check_opts();
|
||||
return;
|
||||
}
|
||||
|
||||
done:
|
||||
focus_magic(winfocus);
|
||||
}
|
||||
|
||||
|
@ -2648,11 +2643,6 @@ focus(struct swm_region *r, union arg *args)
|
|||
default:
|
||||
return;
|
||||
}
|
||||
if (winfocus == winlostfocus || winfocus == NULL) {
|
||||
/* update the bar so that title/class/name will be cleared. */
|
||||
bar_check_opts();
|
||||
return;
|
||||
}
|
||||
|
||||
focus_magic(winfocus);
|
||||
}
|
||||
|
@ -6011,7 +6001,7 @@ focus_magic(struct ws_win *win)
|
|||
if (win->child_trans->take_focus)
|
||||
client_msg(win, takefocus);
|
||||
} else {
|
||||
/* make sure transient hasn't dissapeared */
|
||||
/* make sure transient hasn't disappeared */
|
||||
if (validate_win(win->child_trans) == 0) {
|
||||
focus_win(win->child_trans);
|
||||
if (win->child_trans->take_focus)
|
||||
|
|
Loading…
Add table
Reference in a new issue