From ae69a754244c4e475c8d2591772ca8e005071d83 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 18 Feb 2019 11:55:41 +0100 Subject: Update to 5.42 --- hacks/moire.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hacks/moire.c') diff --git a/hacks/moire.c b/hacks/moire.c index 4add457..c688c8a 100644 --- a/hacks/moire.c +++ b/hacks/moire.c @@ -123,6 +123,7 @@ moire_init_1 (struct state *st) gcv.foreground = st->colors[0].pixel; } + if (st->gc) XFreeGC (st->dpy, st->gc); st->gc = XCreateGC (st->dpy, st->window, GCForeground, &gcv); } @@ -240,6 +241,12 @@ moire_event (Display *dpy, Window window, void *closure, XEvent *event) static void moire_free (Display *dpy, Window window, void *closure) { + struct state *st = (struct state *) closure; + if (st->draw_image) + destroy_xshm_image (dpy, st->draw_image, &st->shm_info); + XFreeGC (dpy, st->gc); + free (st->colors); + free (st); } XSCREENSAVER_MODULE ("Moire", moire) -- cgit v1.2.3-55-g7522