X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fsquiral.c;h=7dff6d8ae1666133daf78a4ffc3ad8bea9bef374;hb=c70f94f648d51bb4828193124f325fa52b0e57f3;hp=dbde586f7d922f24b352f2428e0ca56bcd86302c;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/squiral.c b/hacks/squiral.c index dbde586f..7dff6d8a 100644 --- a/hacks/squiral.c +++ b/hacks/squiral.c @@ -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 };