Added tag 1.3 for changeset dd44dc937e8b0a46abf1a15a333dba5304e4fe89
[dwm.git] / client.c
index 8a8a99e..0b5fb2b 100644 (file)
--- a/client.c
+++ b/client.c
@@ -254,6 +254,10 @@ manage(Window w, XWindowAttributes *wa)
        clients = c;
 
        settitle(c);
+       if(isvisible(c)) {
+               focus(NULL);
+               sel = c;
+       }
        arrange(NULL);
        XMapWindow(dpy, c->win);
        XMapWindow(dpy, c->twin);