From http://www.jwz.org/xscreensaver/xscreensaver-5.18.tar.gz
[xscreensaver] / hacks / ccurve.c
index 27645d7fa918a4a46aeab04e1771079b5f54840b..6f547bea4f51ed2b46849d14e64455081a86364a 100644 (file)
@@ -796,6 +796,7 @@ ccurve_draw (Display *dpy, Window window, void *closure)
                       0, 0);
        }
         st->draw_index++;
+        /* #### mi->recursion_depth = st->draw_index; */
 
         if (st->draw_index >= st->draw_iterations)
           {
@@ -812,6 +813,14 @@ static void
 ccurve_reshape (Display *dpy, Window window, void *closure, 
                  unsigned int w, unsigned int h)
 {
+  struct state *st = (struct state *) closure;
+  XWindowAttributes xgwa;
+  st->width = w;
+  st->height = h;
+  XGetWindowAttributes (st->dpy, st->window, &xgwa);
+  XFreePixmap (dpy, st->pixmap);
+  st->pixmap = XCreatePixmap (st->dpy, st->window, st->width, st->height,
+                              xgwa.depth);
 }
 
 static Bool