X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fsquiral.c;h=48cd5f8c9049e11b5560973d0e0820a89bff58e1;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=e261f59a8226a49566211748bf55945910a541ad;hpb=4ade52359b6eba3621566dac79793a33aa4c915f;p=xscreensaver diff --git a/hacks/squiral.c b/hacks/squiral.c index e261f59a..48cd5f8c 100644 --- a/hacks/squiral.c +++ b/hacks/squiral.c @@ -14,7 +14,7 @@ #include "erase.h" #include "yarandom.h" -#define R(x) (abs(random())%x) +#define R(x) (random()%x) #define PROB(x) (frand(1.0) < (x)) #define NCOLORSMAX 255 @@ -239,6 +239,13 @@ squiral_reshape (Display *dpy, Window window, void *closure, static Bool squiral_event (Display *dpy, Window window, void *closure, XEvent *event) { + struct state *st = (struct state *) closure; + if (screenhack_event_helper (dpy, window, event)) + { + squiral_init_1 (st); + XClearWindow (dpy, window); + return True; + } return False; } @@ -261,7 +268,7 @@ static const char *squiral_defaults[] = { "*disorder: 0.005", "*cycle: False", "*handedness: 0.5", -#ifdef USE_IPHONE +#ifdef HAVE_MOBILE "*ignoreRotation: True", #endif 0