From 7539247be35bae830dcc467d5fb415fdcaf99eed Mon Sep 17 00:00:00 2001 From: phillbush Date: Fri, 31 Jul 2020 10:09:26 -0300 Subject: [PATCH] Freeing fonts --- xmenu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xmenu.c b/xmenu.c index e624ac0..c5a0795 100644 --- a/xmenu.c +++ b/xmenu.c @@ -1249,6 +1249,8 @@ cleanmenu(struct Menu *menu) static void cleanup(void) { + size_t i; + XUngrabPointer(dpy, CurrentTime); XUngrabKeyboard(dpy, CurrentTime); @@ -1259,6 +1261,9 @@ cleanup(void) XftColorFree(dpy, visual, colormap, &dc.separator); XftColorFree(dpy, visual, colormap, &dc.border); + for (i = 0; i < dc.nfonts; i++) + XftFontClose(dpy, dc.fonts[i]); + XFreeGC(dpy, dc.gc); XCloseDisplay(dpy); }