X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=main.c;h=5a22982270f815c2239cbf4a1a2c063f8712da15;hb=beac539f31a37f5eece142d8f3a24349926b7643;hp=062f9d7557b8d3c8828bfd5dc16de9864faa019e;hpb=35e96b8deba8aae863cef32f2ea2a84ebf162472;p=dwm.git diff --git a/main.c b/main.c index 062f9d7..5a22982 100644 --- a/main.c +++ b/main.c @@ -4,6 +4,7 @@ #include "dwm.h" #include +#include #include #include #include @@ -39,9 +40,9 @@ static Bool otherwm, readin; static void cleanup(void) { close(STDIN_FILENO); - while(sel) { - resize(sel, True, TopLeft); - unmanage(sel); + while(clients) { + resize(clients, True, TopLeft); + unmanage(clients); } if(dc.font.set) XFreeFontSet(dpy, dc.font.set); @@ -51,6 +52,9 @@ cleanup(void) { XFreePixmap(dpy, dc.drawable); XFreeGC(dpy, dc.gc); XDestroyWindow(dpy, barwin); + XFreeCursor(dpy, cursor[CurNormal]); + XFreeCursor(dpy, cursor[CurResize]); + XFreeCursor(dpy, cursor[CurMove]); XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); XSync(dpy, False); free(seltag); @@ -104,7 +108,7 @@ setup(void) { numlockmask = (1 << i); } } - XFree(modmap); + XFreeModifiermap(modmap); /* select for events */ wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask | EnterWindowMask | LeaveWindowMask; @@ -237,6 +241,7 @@ main(int argc, char *argv[]) { } else if(argc != 1) eprint("usage: dwm [-v]\n"); + setlocale(LC_CTYPE, ""); dpy = XOpenDisplay(0); if(!dpy) eprint("dwm: cannot open display\n");