X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fimsmap.c;h=aeee0308526344d65c48482e31d6450bfea1b0f4;hp=6e1f31dded435a8f7bbc437cc2dead2c62546155;hb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;hpb=de460e831dc8578acfa8b72251ab9346c99c1f96 diff --git a/hacks/imsmap.c b/hacks/imsmap.c index 6e1f31dd..aeee0308 100644 --- a/hacks/imsmap.c +++ b/hacks/imsmap.c @@ -161,6 +161,9 @@ init_map (struct state *st) if (mono_p) st->flip_xy = 0; + else if (st->colors) + free_colors (st->dpy, st->cmap, st->colors, st->ncolors); + st->colors = 0; st->ncolors = get_integer_resource (st->dpy, "ncolors", "Integer"); st->delay = get_integer_resource (st->dpy, "delay", "Integer"); @@ -183,10 +186,7 @@ init_map (struct state *st) if (!mono_p) { - if (st->colors) - free_colors (st->dpy, st->cmap, st->colors, st->ncolors); - else - st->colors = (XColor *) malloc (st->ncolors * sizeof(*st->colors)); + st->colors = (XColor *) malloc (st->ncolors * sizeof(*st->colors)); make_smooth_colormap (st->dpy, st->xgwa.visual, st->cmap, st->colors, &st->ncolors, @@ -395,6 +395,7 @@ imsmap_free (Display *dpy, Window window, void *closure) static const char *imsmap_defaults [] = { ".background: #000066", ".foreground: #FF00FF", + "*fpsSolid: true", "*mode: random", "*ncolors: 50", "*iterations: 7", @@ -412,4 +413,4 @@ static XrmOptionDescRec imsmap_options [] = { { 0, 0, 0, 0 } }; -XSCREENSAVER_MODULE ("IMSMAP", imsmap) +XSCREENSAVER_MODULE ("IMSMap", imsmap)