Improve code of func "focusmon"

This commit is contained in:
Alex Kotov 2021-11-20 21:59:31 +05:00
parent ccf2b24de8
commit e8aa0dfb24
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 4 additions and 5 deletions

View File

@ -578,12 +578,11 @@ void focus(Client *c)
void focusmon(const Arg *arg)
{
Monitor *m;
if (!mons->next) return;
Monitor *m;
if ((m = dirtomon(arg->i)) == selmon) return;
if (!mons->next)
return;
if ((m = dirtomon(arg->i)) == selmon)
return;
unfocus(selmon->sel, 0);
selmon = m;
focus(NULL);