X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fvermiculate.c;h=4d816ff63adbf5271c5496a77c04f8e1347d7e0a;hb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;hp=d1ef57198af245212cfc971fa17e2c4998507e67;hpb=6f5482d73adb0165c0130bb47d852644ab0c4869;p=xscreensaver diff --git a/hacks/vermiculate.c b/hacks/vermiculate.c index d1ef5719..4d816ff6 100644 --- a/hacks/vermiculate.c +++ b/hacks/vermiculate.c @@ -209,9 +209,8 @@ static void randpal (struct state *st) { int ncolors = tailmax - 1; - make_random_colormap (st->dpy, - st->xgwa.visual, - st->mycmap, &st->mycolors[1], &ncolors, True, True, 0, True); + make_random_colormap (st->xgwa.screen, st->xgwa.visual, st->mycmap, + &st->mycolors[1], &ncolors, True, True, 0, True); if (ncolors < tailmax - 1) { int c; @@ -817,6 +816,12 @@ vermiculate_reshape (Display *dpy, Window window, void *closure, static Bool vermiculate_event (Display *dpy, Window window, void *closure, XEvent *event) { + struct state *st = (struct state *) closure; + if (screenhack_event_helper (dpy, window, event)) + { + st->reset_p = 1; + return True; + } return False; } @@ -883,8 +888,9 @@ consume_instring(struct state *st) block in which it's invoked, since it declares variables: */ #define forallinbank(LDP) linedata *LDP; int bankc; \ for (bankc = 1; \ - (LDP = &st->thread[st->bank[bankc - 1] - 1], \ - bankc <= st->bnkt); bankc++) + ((bankc <= st->bnkt) ? ( \ + (LDP = &st->thread[st->bank[bankc - 1] - 1], 1) \ + ) : 0) ; bankc++) { forallinbank (L) L->slice = degs / (st->ch - '0'); } @@ -1206,6 +1212,9 @@ static const char *vermiculate_defaults[] = { "*fpsSolid: true", "*speed: 0", "*instring: ", +#ifdef USE_IPHONE + "*ignoreRotation: True", +#endif 0 };