- gcv.foreground = default_fg_pixel =
- get_pixel_resource ("foreground", "Foreground", dpy, cmap);
- draw_gc = XCreateGC (dpy, window, GCForeground, &gcv);
- gcv.foreground = get_pixel_resource ("background", "Background", dpy, cmap);
- erase_gc = XCreateGC (dpy, window, GCForeground, &gcv);
- iterations = get_integer_resource ("iterations", "Integer");
- offset = get_integer_resource ("offset", "Integer");
- if (offset <= 0) offset = 3;
- if (iterations < 10) iterations = 10;
- xsym = get_boolean_resource ("xsymmetry", "Symmetry");
- ysym = get_boolean_resource ("ysymmetry", "Symmetry");
+ gcv.foreground = st->default_fg_pixel =
+ get_pixel_resource (dpy, cmap, "foreground", "Foreground");
+ st->draw_gc = XCreateGC (dpy, window, GCForeground, &gcv);
+ gcv.foreground = get_pixel_resource (dpy, cmap, "background", "Background");
+ st->iterations = get_integer_resource (dpy, "iterations", "Integer");
+ st->offset = get_integer_resource (dpy, "offset", "Integer");
+ if (st->offset <= 0) st->offset = 3;
+ if (st->iterations < 10) st->iterations = 10;
+ st->sleep_time = get_integer_resource (dpy, "delay", "Delay");
+ st->xsym = get_boolean_resource (dpy, "xsymmetry", "Symmetry");
+ st->ysym = get_boolean_resource (dpy, "ysymmetry", "Symmetry");
+ st->remaining_iterations = -1;
+ st->color.pixel = 0;
+ return st;