From http://www.jwz.org/xscreensaver/xscreensaver-5.18.tar.gz
[xscreensaver] / hacks / ccurve.c
index 9e7e2de3ca53e197a0c03958a2cd5beb1e5624c2..6f547bea4f51ed2b46849d14e64455081a86364a 100644 (file)
@@ -813,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