summaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dmenu.c b/dmenu.c
index 4f22ffe..1c2e780 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -92,13 +92,13 @@ calcoffsets(void)
static void
cleanup(void)
{
+ size_t i;
+
XUngrabKey(dpy, AnyKey, AnyModifier, root);
- drw_clr_free(scheme[SchemeNorm].bg);
- drw_clr_free(scheme[SchemeNorm].fg);
- drw_clr_free(scheme[SchemeSel].fg);
- drw_clr_free(scheme[SchemeSel].bg);
- drw_clr_free(scheme[SchemeOut].fg);
- drw_clr_free(scheme[SchemeOut].bg);
+ for (i = 0; i < SchemeLast; i++) {
+ drw_clr_free(scheme[i].bg);
+ drw_clr_free(scheme[i].fg);
+ }
drw_free(drw);
XSync(dpy, False);
XCloseDisplay(dpy);