summaryrefslogtreecommitdiffstats
path: root/hacks/compass.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-18 11:55:58 +0100
committerSimon Rettberg2019-02-18 11:55:58 +0100
commitaa7530630e595b80d5db54655fd827b61edc0fd7 (patch)
tree048cb74072450c7592f254c3537ac8f252d09d73 /hacks/compass.c
parentForgot one DPMS killing instance (diff)
parentUpdate to 5.42 (diff)
downloadxscreensaver-23.tar.gz
xscreensaver-23.tar.xz
xscreensaver-23.zip
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/compass.c')
-rw-r--r--hacks/compass.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hacks/compass.c b/hacks/compass.c
index 1dc1d3e..1678ca9 100644
--- a/hacks/compass.c
+++ b/hacks/compass.c
@@ -957,6 +957,18 @@ compass_event (Display *dpy, Window window, void *closure, XEvent *event)
static void
compass_free (Display *dpy, Window window, void *closure)
{
+ struct state *st = (struct state *) closure;
+ int i;
+ XFreeGC (dpy, st->ptr_gc);
+ XFreeGC (dpy, st->erase_gc);
+ for (i = 0; i < 4; i++)
+ if (st->discs[i]) {
+ XFreeGC (dpy, st->discs[i]->gc);
+ free (st->discs[i]);
+ }
+ if (st->ba) XFreePixmap (dpy, st->ba);
+ if (st->bb) XFreePixmap (dpy, st->bb);
+ free (st);
}