~ruther/dwl

62fb4c086ea5080977edc4ec017390aa924607ed — Stivvo 4 years ago 388ab9d
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
1 files changed, 6 insertions(+), 4 deletions(-)

M dwl.c
M dwl.c => dwl.c +6 -4
@@ 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