X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fcloudlife.c;h=4b65f9e3fa3250543f60d47c95cdac3ab2fcb858;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=911b99be27bd8d2c6581a5e5e59d8faed492bed8;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/cloudlife.c b/hacks/cloudlife.c index 911b99be..4b65f9e3 100644 --- a/hacks/cloudlife.c +++ b/hacks/cloudlife.c @@ -302,7 +302,8 @@ cloudlife_init (Display *dpy, Window window) if (st->cycle_colors) { st->colors = (XColor *) xrealloc(st->colors, sizeof(XColor) * (st->ncolors+1)); - make_smooth_colormap (st->dpy, st->xgwa.visual, st->xgwa.colormap, st->colors, &st->ncolors, + make_smooth_colormap (st->xgwa.screen, st->xgwa.visual, + st->xgwa.colormap, st->colors, &st->ncolors, True, &tmp, True); } @@ -376,6 +377,14 @@ cloudlife_reshape (Display *dpy, Window window, void *closure, static Bool cloudlife_event (Display *dpy, Window window, void *closure, XEvent *event) { + struct state *st = (struct state *) closure; + if (screenhack_event_helper (dpy, window, event)) + { + XClearWindow (dpy, window); + st->cycles = 0; + st->field = init_field(st); + return True; + } return False; } @@ -397,6 +406,9 @@ static const char *cloudlife_defaults[] = { "*maxAge: 64", "*initialDensity: 30", "*cellSize: 3", +#ifdef HAVE_MOBILE + "*ignoreRotation: True", +#endif 0 };