I think this is the best solution of multihead support
[dwm.git] / client.c
index 177eb94..5309d0e 100644 (file)
--- a/client.c
+++ b/client.c
@@ -81,7 +81,7 @@ void
 focus(Client *c) {
        Client *old = sel;
 
-       if(!issel || (c && !isvisible(c)))
+       if(c && !isvisible(c))
                return;
 
        if(old && old != c) {
@@ -96,7 +96,7 @@ focus(Client *c) {
                XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
                XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
        }
-       else
+       else if(issel)
                XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
        sel = c;
        drawstatus();