-
- if (! flip_p)
- pick_new (st);
-
- new_colors (st);
- st->new_layer = 0;
- }
-
- {
- int i;
- for (i = 0; i < 1000; i++) {
- if (go (st, st->radius1,
- (flip_p ? st->radius2 : -st->radius2),
- st->distance)) {
- st->new_layer = 1;
- break;
+ /* Next draw is delayed sleep_time (initialized value)*/
+ return st->sub_sleep_time;
+
+ case NEW_LAYER:
+ /* Increment counter */
+ st->counter++;
+ if (st->counter > (2 * st->num_layers)) {
+ /* reset to zero, free, and erase next time through */
+ st->counter = 0;
+ if (free_color)
+ XFreeColors (st->dpy, st->xgwa.colormap, &st->color.pixel, 1, 0);
+ st->drawstate = ERASE1;
+ } else {
+ /* first, third, fifth, ... time through */
+ if (!flip_p)
+ pick_new (st);
+
+ new_colors (st);
+ st->drawstate = DRAW;