diff -r 81b40dd1b766 dwm.c --- a/dwm.c Mon Jun 02 12:19:02 2008 +0200 +++ b/dwm.c Tue Jun 03 21:22:35 2008 +0200 @@ -612,7 +612,7 @@ void focus(Client *c) { - if(!c || (c && c->isbanned)) + if(!c || c->isbanned) for(c = stack; c && c->isbanned; c = c->snext); if(sel && sel != c) { grabbuttons(sel, False); @@ -622,14 +622,12 @@ detachstack(c); attachstack(c); grabbuttons(c, True); - } - sel = c; - if(c) { XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); } else XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + sel = c; drawbar(); }