X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=main.c;h=067f383666b460f366eee558f48e2c589e655633;hb=f679125206ae28b38f77e9620a67365d310ddff3;hp=5a22982270f815c2239cbf4a1a2c063f8712da15;hpb=b5d297f02fb545c421468398cabca56c61bab36c;p=dwm.git diff --git a/main.c b/main.c index 5a22982..067f383 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* (C)opyright MMVI Anselm R. Garbe +/* (C)opyright MMVI-MMVII Anselm R. Garbe * See LICENSE file for license details. */ @@ -17,10 +17,10 @@ /* extern */ -char stext[1024]; +char stext[1024], mtext[32]; Bool *seltag; int bx, by, bw, bh, bmw, masterd, screen, sx, sy, sw, sh, wax, way, waw, wah; -unsigned int master, ntags, numlockmask; +unsigned int master, nmaster, ntags, numlockmask; Atom wmatom[WMLast], netatom[NetLast]; Bool running = True; Bool issel = True; @@ -40,9 +40,9 @@ static Bool otherwm, readin; static void cleanup(void) { close(STDIN_FILENO); - while(clients) { - resize(clients, True, TopLeft); - unmanage(clients); + while(stack) { + resize(stack, True, TopLeft); + unmanage(stack); } if(dc.font.set) XFreeFontSet(dpy, dc.font.set); @@ -101,6 +101,7 @@ setup(void) { cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing); cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); /* init modifier map */ + numlockmask = 0; modmap = XGetModifierMapping(dpy); for (i = 0; i < 8; i++) { for (j = 0; j < modmap->max_keypermod; j++) { @@ -128,11 +129,12 @@ setup(void) { dc.status[ColFG] = getcolor(STATUSFGCOLOR); setfont(FONT); /* geometry */ - bmw = textw(TILESYMBOL) > textw(FLOATSYMBOL) ? textw(TILESYMBOL) : textw(FLOATSYMBOL); sx = sy = 0; sw = DisplayWidth(dpy, screen); sh = DisplayHeight(dpy, screen); master = MASTER; + nmaster = NMASTER; + updatemodetext(); /* bar */ bx = sx; by = sy; @@ -236,7 +238,7 @@ main(int argc, char *argv[]) { fd_set rd; if(argc == 2 && !strncmp("-v", argv[1], 3)) { - fputs("dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout); + fputs("dwm-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n", stdout); exit(EXIT_SUCCESS); } else if(argc != 1)