JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
same as before with dwm.c as well
[dwm.git] / dwm.c
diff --git a/dwm.c b/dwm.c
index 314adf4..ffc8864 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -1542,6 +1542,7 @@ setup(void) {
        XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
        XSelectInput(dpy, root, wa.event_mask);
        grabkeys();
+       focus(NULL);
 }
 
 void
@@ -1569,6 +1570,8 @@ sigchld(int unused) {
 
 void
 spawn(const Arg *arg) {
+       if(arg->v == dmenucmd)
+               dmenumon[0] = '0' + selmon->num;
        if(fork() == 0) {
                if(dpy)
                        close(ConnectionNumber(dpy));
@@ -2043,7 +2046,7 @@ zoom(const Arg *arg) {
 int
 main(int argc, char *argv[]) {
        if(argc == 2 && !strcmp("-v", argv[1]))
-               die("dwm-"VERSION", © 2006-2012 dwm engineers, see LICENSE for details\n");
+               die("dwm-"VERSION", © 2006-2014 dwm engineers, see LICENSE for details\n");
        else if(argc != 1)
                die("usage: dwm [-v]\n");
        if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())