+ return (0 == st->nwalkers);
+}
+
+static void *
+coral_init (Display *dpy, Window window)
+{
+ struct state *st = (struct state *) calloc (1, sizeof(*st));
+ st->dpy = dpy;
+ st->window = window;
+ st->max_points = 200;
+ st->pointbuf = (XPoint *) calloc(sizeof(XPoint), st->max_points+2);
+ if (!st->pointbuf) exit(-1);
+
+ st->delay = get_integer_resource (st->dpy, "delay", "Integer");
+ st->delay2 = get_integer_resource (st->dpy, "delay2", "Integer");
+ st->reset = 1;
+ return st;
+}
+
+
+static unsigned long
+coral_draw (Display *dpy, Window window, void *closure)
+{
+ struct state *st = (struct state *) closure;
+
+ if (st->eraser || st->done)
+ {
+ st->done = 0;
+ st->eraser = erase_window (st->dpy, st->window, st->eraser);
+ return st->delay2;
+ }
+
+ if (st->reset)
+ init_coral(st);
+ st->reset = st->done = coral(st);
+
+ return (st->reset
+ ? (st->delay * 1000000)
+ : st->delay2);
+}
+
+static void
+coral_reshape (Display *dpy, Window window, void *closure,
+ unsigned int w, unsigned int h)
+{
+ struct state *st = (struct state *) closure;
+ init_coral(st);
+}
+
+static Bool
+coral_event (Display *dpy, Window window, void *closure, XEvent *event)
+{
+ struct state *st = (struct state *) closure;
+ if (screenhack_event_helper (dpy, window, event))
+ {
+ st->reset = 1;
+ return True;