X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fifs.c;h=63cb1a8c7f9082fd106a6b2d2414abc4f84753cd;hb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;hp=d79f0f32c9f9b23272a50817a920e629bd69fdd0;hpb=c494fd2e6b3b25582375d62e40f4f5cc984ca424;p=xscreensaver diff --git a/hacks/ifs.c b/hacks/ifs.c index d79f0f32..63cb1a8c 100644 --- a/hacks/ifs.c +++ b/hacks/ifs.c @@ -92,6 +92,7 @@ myrandom(float up) static const char *ifs_defaults [] = { ".background: Black", "*lensnum: 3", + "*fpsSolid: true", "*length: 9", "*mode: 0", "*colors: 200", @@ -105,6 +106,9 @@ static const char *ifs_defaults [] = { "*doubleBuffer: False", #else "*doubleBuffer: True", +#endif +#ifdef USE_IPHONE + "*ignoreRotation: True", #endif 0 }; @@ -434,7 +438,7 @@ ifs_init (Display *d_arg, Window w_arg) if (st->colours) free(st->colours); st->colours = (XColor *)calloc(st->ncolours, sizeof(XColor)); if (!st->colours) exit(1); - make_smooth_colormap (st->dpy, xgwa.visual, xgwa.colormap, + make_smooth_colormap (xgwa.screen, xgwa.visual, xgwa.colormap, st->colours, &st->ncolours, True, 0, False); @@ -512,6 +516,20 @@ ifs_reshape (Display *dpy, Window window, void *closure, static Bool ifs_event (Display *dpy, Window window, void *closure, XEvent *event) { + struct state *st = (struct state *)closure; + if (screenhack_event_helper (dpy, window, event)) + { + int i; + for (i = 0; i < st->lensnum; i++) { + CreateLens(st, + myrandom(1)-0.5, + myrandom(1), + myrandom(4)-2, + myrandom(4)+2, + &st->lenses[i]); + } + return True; + } return False; }