prevent an infinite loop if try to use focusmon() with all monitors disabled

このコミットが含まれているのは:
Leonardo Hernández Hernández 2022-08-13 19:57:20 -05:00
コミット 406aebcbd2
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: E538897EE11B9624
1個のファイルの変更5行の追加3行の削除

8
dwl.c
ファイルの表示

@ -1192,9 +1192,11 @@ focusclient(Client *c, int lift)
void
focusmon(const Arg *arg)
{
do
selmon = dirtomon(arg->i);
while (!selmon->wlr_output->enabled);
int i = 0, nmons = wl_list_length(&mons);
if (nmons)
do /* don't switch to disabled mons */
selmon = dirtomon(arg->i);
while (!selmon->wlr_output->enabled && i++ < nmons);
focusclient(focustop(selmon), 1);
}