X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.c;fp=dwm.c;h=82bf8b7d832ef9064e3bc718bddc6fa20770c5e1;hp=b7f5a2650ac07a243f2f5a137c9fa490a01e0031;hb=93237bb9f256892ade8675fa60979b002b725831;hpb=e0fbc682ec3db0e27b7dc09546aea36906295bf6 diff --git a/dwm.c b/dwm.c index b7f5a26..82bf8b7 100644 --- a/dwm.c +++ b/dwm.c @@ -748,10 +748,11 @@ detachstack(Client *c) { for(i = nextvisible(c->mon->clients); i && i != c; i = nextvisible(i->next)) next_sel = i; // failing that, find first visible window (besides c) - if (!next_sel) + if (!next_sel) { for(i = nextvisible(c->mon->clients); i && i == c; i = nextvisible(i->next)); if (i != c) next_sel = i; + } c->mon->sel = next_sel; } if (prev) {