summaryrefslogtreecommitdiffstats
path: root/hacks/intermomentary.c
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/intermomentary.c')
-rw-r--r--hacks/intermomentary.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/hacks/intermomentary.c b/hacks/intermomentary.c
index 4e65b76..fc5b932 100644
--- a/hacks/intermomentary.c
+++ b/hacks/intermomentary.c
@@ -543,6 +543,22 @@ static void
intermomentary_free (Display *dpy, Window window, void *closure)
{
struct state *st = (struct state *) closure;
+ if (st->f) {
+ if (st->f->off_alpha) free(st->f->off_alpha);
+ if (st->f->off_map != window) XFreePixmap (dpy, st->f->off_map);
+ if (st->f->discs) {
+ int i;
+ for (i = 0; i < st->f->num; i++) {
+ if (st->f->discs[i].pxRiders) free (st->f->discs[i].pxRiders);
+ }
+ free (st->f->discs);
+ }
+ free (st->f);
+ }
+ if (st->colors) free (st->colors);
+ XFreeGC (dpy, st->fgc);
+ XFreeGC (dpy, st->copygc);
+
free (st);
}