JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
renamed seltag into seltags
[dwm.git] / main.c
diff --git a/main.c b/main.c
index d72f13d..0ae288c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -11,6 +11,7 @@
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
 #include <X11/Xproto.h>
+#include <X11/Xutil.h>
 
 /* extern */
 
@@ -19,8 +20,8 @@ int screen, sx, sy, sw, sh, wax, way, waw, wah;
 unsigned int bh, ntags;
 unsigned int bpos = BARPOS;
 unsigned int numlockmask = 0;
-Atom wmatom[WMLast], netatom[NetLast];
-Bool *seltag;
+Atom dwmconfig, wmatom[WMLast], netatom[NetLast];
+Bool *seltags;
 Bool selscreen = True;
 Client *clients = NULL;
 Client *sel = NULL;
@@ -41,7 +42,7 @@ cleanup(void) {
        close(STDIN_FILENO);
        while(stack) {
                unban(stack);
-               unmanage(stack);
+               unmanage(stack, NormalState);
        }
        if(dc.font.set)
                XFreeFontSet(dpy, dc.font.set);
@@ -56,7 +57,7 @@ cleanup(void) {
        XFreeCursor(dpy, cursor[CurMove]);
        XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
        XSync(dpy, False);
-       free(seltag);
+       free(seltags);
 }
 
 static unsigned long
@@ -139,6 +140,7 @@ setup(void) {
        XSetWindowAttributes wa;
 
        /* init atoms */
+       dwmconfig = XInternAtom(dpy, "_DWM_CONFIG", False);
        wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
        wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
        wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
@@ -168,8 +170,8 @@ setup(void) {
        grabkeys();
        compileregs();
        for(ntags = 0; tags[ntags]; ntags++);
-       seltag = emallocz(sizeof(Bool) * ntags);
-       seltag[0] = True;
+       seltags = emallocz(sizeof(Bool) * ntags);
+       seltags[0] = True;
        /* style */
        dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR);
        dc.norm[ColBG] = initcolor(NORMBGCOLOR);