JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
implemented NET_ACTIVE_WINDOW support
[dwm.git] / main.c
diff --git a/main.c b/main.c
index db03958..ded4761 100644 (file)
--- a/main.c
+++ b/main.c
@@ -201,6 +201,7 @@ main(int argc, char *argv[])
        wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
        netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
        netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
+       netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
        XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
                        PropModeReplace, (unsigned char *) netatom, NetLast);
 
@@ -240,6 +241,8 @@ main(int argc, char *argv[])
 
        dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen));
        dc.gc = XCreateGC(dpy, root, 0, 0);
+
+       strcpy(stext, "dwm-"VERSION);
        drawstatus();
 
        issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask);
@@ -248,7 +251,6 @@ main(int argc, char *argv[])
        wa.cursor = cursor[CurNormal];
        XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
 
-       strcpy(stext, "dwm-"VERSION);
        scan();
 
        /* main event loop, also reads status text from stdin */