diff options
author | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
commit | aa7530630e595b80d5db54655fd827b61edc0fd7 (patch) | |
tree | 048cb74072450c7592f254c3537ac8f252d09d73 /hacks/xrayswarm.c | |
parent | Forgot one DPMS killing instance (diff) | |
parent | Update to 5.42 (diff) | |
download | xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.gz xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.tar.xz xscreensaver-aa7530630e595b80d5db54655fd827b61edc0fd7.zip |
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/xrayswarm.c')
-rw-r--r-- | hacks/xrayswarm.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |