mirror of git://git.suckless.org/dwm
dwm: cleanup: free schemes and cursors as array
This commit is contained in:
parent
7e1182ce55
commit
4a4817b3aa
17
dwm.c
17
dwm.c
|
@ -462,6 +462,7 @@ cleanup(void) {
|
||||||
Arg a = {.ui = ~0};
|
Arg a = {.ui = ~0};
|
||||||
Layout foo = { "", NULL };
|
Layout foo = { "", NULL };
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
view(&a);
|
view(&a);
|
||||||
selmon->lt[selmon->sellt] = &foo;
|
selmon->lt[selmon->sellt] = &foo;
|
||||||
|
@ -471,15 +472,13 @@ cleanup(void) {
|
||||||
XUngrabKey(dpy, AnyKey, AnyModifier, root);
|
XUngrabKey(dpy, AnyKey, AnyModifier, root);
|
||||||
while(mons)
|
while(mons)
|
||||||
cleanupmon(mons);
|
cleanupmon(mons);
|
||||||
drw_cur_free(drw, cursor[CurNormal]);
|
for(i = 0; i < CurLast; i++)
|
||||||
drw_cur_free(drw, cursor[CurResize]);
|
drw_cur_free(drw, cursor[i]);
|
||||||
drw_cur_free(drw, cursor[CurMove]);
|
for(i = 0; i < SchemeLast; i++) {
|
||||||
drw_clr_free(scheme[SchemeNorm].border);
|
drw_clr_free(scheme[i].border);
|
||||||
drw_clr_free(scheme[SchemeNorm].bg);
|
drw_clr_free(scheme[i].bg);
|
||||||
drw_clr_free(scheme[SchemeNorm].fg);
|
drw_clr_free(scheme[i].fg);
|
||||||
drw_clr_free(scheme[SchemeSel].border);
|
}
|
||||||
drw_clr_free(scheme[SchemeSel].bg);
|
|
||||||
drw_clr_free(scheme[SchemeSel].fg);
|
|
||||||
drw_free(drw);
|
drw_free(drw);
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
|
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
|
||||||
|
|
Loading…
Reference in New Issue