Block access to disabled monitor

Before this, pressing mod+comma or mod+period (focusmon function) moved
the focus to disabed monitors. Now, all disabled monitors are skipped
This commit is contained in:
Stivvo 2020-10-30 23:49:01 +01:00
parent 388ab9df2f
commit 62fb4c086e

10
dwl.c
View file

@ -1087,10 +1087,12 @@ focusclient(Client *old, Client *c, int lift)
void
focusmon(const Arg *arg)
{
Client *sel = selclient();
selmon = dirtomon(arg->i);
focusclient(sel, focustop(selmon), 1);
Client *sel;
do {
sel = selclient();
selmon = dirtomon(arg->i);
focusclient(sel, focustop(selmon), 1);
} while (!selmon->wlr_output->enabled);
}
void