X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=main.c;h=9d583b2823822ad8620a545a926220585be01ef1;hb=b597fa46370af6594c0980f6c2ddefbe943ee933;hp=7ada11467bb8e4688c68a2aa4d18ba0490a25c20;hpb=aa471f2d65688f8cf4944c073ff05224bfac8a9c;p=dwm.git diff --git a/main.c b/main.c index 7ada114..9d583b2 100644 --- a/main.c +++ b/main.c @@ -19,13 +19,15 @@ char stext[1024]; Bool *seltag; -int screen, sx, sy, sw, sh, bx, by, bw, bh, mw; -unsigned int ntags, numlockmask, modew; +int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh; +unsigned int ntags, numlockmask; Atom wmatom[WMLast], netatom[NetLast]; Bool running = True; Bool issel = True; +Bool maximized = False; Client *clients = NULL; Client *sel = NULL; +Client *stack = NULL; Cursor cursor[CurLast]; Display *dpy; DC dc = {0}; @@ -54,6 +56,7 @@ cleanup() XDestroyWindow(dpy, barwin); XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); XSync(dpy, False); + free(seltag); } static void @@ -129,7 +132,7 @@ setup() dc.status[ColFG] = getcolor(STATUSFGCOLOR); setfont(FONT); - modew = textw(FLOATSYMBOL) > textw(TILEDSYMBOL) ? textw(FLOATSYMBOL) : textw(TILEDSYMBOL); + bmw = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL); sx = sy = 0; sw = DisplayWidth(dpy, screen); sh = DisplayHeight(dpy, screen); @@ -211,7 +214,7 @@ quit(Arg *arg) /* * There's no way to check accesses to destroyed windows, thus those cases are * ignored (especially on UnmapNotify's). Other types of errors call Xlibs - * default error handler, which calls exit(). + * default error handler, which may call exit. */ int xerror(Display *dpy, XErrorEvent *ee) @@ -226,7 +229,7 @@ xerror(Display *dpy, XErrorEvent *ee) return 0; fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n", ee->request_code, ee->error_code); - return xerrorxlib(dpy, ee); /* may call exit() */ + return xerrorxlib(dpy, ee); /* may call exit */ } int