http://www.jwz.org/xscreensaver/xscreensaver-5.07.tar.gz
[xscreensaver] / hacks / squiral.c
index dbde586f7d922f24b352f2428e0ca56bcd86302c..7dff6d8ae1666133daf78a4ffc3ad8bea9bef374 100644 (file)
@@ -198,10 +198,12 @@ squiral_draw (Display *dpy, Window window, void *closure)
     memset(&st->fill[(st->height-st->inclear-1)*st->width], 0, sizeof(int)*st->width);
     st->inclear++;
     XDrawLine(st->dpy, st->window, st->erase_gc, 0, st->inclear, st->width-1, st->inclear);
-    memset(&st->fill[st->inclear*st->width], 0, sizeof(int)*st->width);
+    if (st->inclear < st->height)
+      memset(&st->fill[st->inclear*st->width], 0, sizeof(int)*st->width);
     XDrawLine(st->dpy, st->window, st->erase_gc, 0, st->height-st->inclear-1, st->width-1,
               st->height-st->inclear-1);
-    memset(&st->fill[(st->height-st->inclear-1)*st->width], 0, sizeof(int)*st->width);
+    if (st->height - st->inclear >= 1)
+      memset(&st->fill[(st->height-st->inclear-1)*st->width], 0, sizeof(int)*st->width);
     st->inclear++;
     if(st->inclear>st->height/2) st->inclear=st->height;
   }
@@ -236,13 +238,14 @@ squiral_free (Display *dpy, Window window, void *closure)
 static const char *squiral_defaults[] = {
   ".background: black",
   ".foreground: white",
+  "*fpsSolid:  true",
   "*fill:       75",
   "*count:      0",
   "*ncolors:    100",
-  "*delay:      1000",
+  "*delay:      10000",
   "*disorder:   0.005",
   "*cycle:      False",
-  "*handedness: .5",
+  "*handedness: 0.5",
   0
 };