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/coral.c | |
parent | Forgot one DPMS killing instance (diff) | |
parent | Update to 5.42 (diff) | |
download | xscreensaver-23.tar.gz xscreensaver-23.tar.xz xscreensaver-23.zip |
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/coral.c')
-rw-r--r-- | hacks/coral.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hacks/coral.c b/hacks/coral.c index 9cfcf50..f82f9ed 100644 --- a/hacks/coral.c +++ b/hacks/coral.c @@ -71,8 +71,10 @@ init_coral(struct state *st) st->ncolors = 0; } gcv.foreground = st->default_fg_pixel = get_pixel_resource(st->dpy, cmap, "foreground", "Foreground"); + if (st->draw_gc) XFreeGC (st->dpy, st->draw_gc); st->draw_gc = XCreateGC(st->dpy, st->window, GCForeground, &gcv); gcv.foreground = get_pixel_resource (st->dpy, cmap, "background", "Background"); + if (st->erase_gc) XFreeGC (st->dpy, st->erase_gc); st->erase_gc = XCreateGC (st->dpy, st->window, GCForeground, &gcv); st->ncolors = NCOLORSMAX; make_uniform_colormap(xgwa.screen, xgwa.visual, cmap, @@ -283,6 +285,8 @@ coral_free (Display *dpy, Window window, void *closure) { struct state *st = (struct state *) closure; free (st->pointbuf); + XFreeGC (dpy, st->draw_gc); + XFreeGC (dpy, st->erase_gc); if (st->walkers) free (st->walkers); if (st->board) free (st->board); free (st); |