mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-12-16 18:03:19 +00:00
prevent an infinite loop if try to use focusmon() with all monitors disabled
This commit is contained in:
parent
7a343b98cf
commit
d7fae8e19c
7
dwl.c
7
dwl.c
@ -1199,9 +1199,12 @@ focusclient(Client *c, int lift)
|
||||
void
|
||||
focusmon(const Arg *arg)
|
||||
{
|
||||
do
|
||||
Monitor *m = selmon;
|
||||
do {
|
||||
selmon = dirtomon(arg->i);
|
||||
while (!selmon->wlr_output->enabled);
|
||||
if (!selmon || selmon == m)
|
||||
break;
|
||||
} while (!selmon->wlr_output->enabled);
|
||||
focusclient(focustop(selmon), 1);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user