about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/client.c b/client.c
index 81f4280..0b5fb2b 100644
--- a/client.c
+++ b/client.c
@@ -254,8 +254,10 @@ manage(Window w, XWindowAttributes *wa)
 	clients = c;
 
 	settitle(c);
-	if(isvisible(c))
+	if(isvisible(c)) {
+		focus(NULL);
 		sel = c;
+	}
 	arrange(NULL);
 	XMapWindow(dpy, c->win);
 	XMapWindow(dpy, c->twin);
f='#n74'>74 75 76 77 78 79 80 81 82 83 84