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/xrayswarm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hacks/xrayswarm.c') diff --git a/hacks/xrayswarm.c b/hacks/xrayswarm.c index 678c7b0..d14eb39 100644 --- a/hacks/xrayswarm.c +++ b/hacks/xrayswarm.c @@ -324,6 +324,7 @@ static int initGraphics(struct state *st) color.flags=DoRed|DoGreen|DoBlue; XAllocColor(st->dpy,cmap,&color); xgcv.foreground=color.pixel; + if (st->fgc[i]) XFreeGC (st->dpy, st->fgc[i]); st->fgc[i] = XCreateGC(st->dpy, st->win, GCForeground | GCFunction,&xgcv); #ifdef HAVE_JWXYZ jwxyz_XSetAntiAliasing (st->dpy, st->fgc[i], False); @@ -1218,6 +1219,10 @@ static void xrayswarm_free (Display *dpy, Window window, void *closure) { struct state *st = (struct state *) closure; + int i; + for (i = 0; i < 256; i++) + if (st->fgc[i]) XFreeGC (dpy, (st->fgc[i])); + XFreeGC (dpy, st->cgc); free (st); } -- cgit v1.2.3-55-g7522