From http://www.jwz.org/xscreensaver/xscreensaver-5.18.tar.gz
[xscreensaver] / hacks / anemone.c
index 652e4770659dd4fa780aa7dc65a0ddcdeece5deb..f69e0967f1354a29cb592eae9b2f16c4651f7e11 100644 (file)
@@ -152,8 +152,6 @@ initAppendages(struct state *st)
     st->aCurr->growth = st->finpoints / 2 + RND(st->finpoints / 2);
     st->aCurr->rate = RND(11) * RND(11);
 
-    dist = 1.;
-
     do {
       x = (1 - RND(1001) / 500);
       y = (1 - RND(1001) / 500);
@@ -382,11 +380,20 @@ static void
 anemone_reshape (Display *dpy, Window window, void *closure, 
                  unsigned int w, unsigned int h)
 {
-  /* need to re-make pixmaps too...
   struct state *st = (struct state *) closure;
   st->scrWidth = w;
   st->scrHeight = h;
-  */
+#if 0
+  if (st->dbuf) {
+    XWindowAttributes wa;
+    XGetWindowAttributes(dpy, window, &wa);
+    if (st->ba) XFreePixmap (dpy, st->ba);
+    if (st->bb) XFreePixmap (dpy, st->bb);
+    st->ba = XCreatePixmap (dpy, window, st->scrWidth, st->scrHeight, wa.depth);
+    st->bb = XCreatePixmap (dpy, window, st->scrWidth, st->scrHeight, wa.depth);
+    st->b = st->ba;
+  }
+#endif
 }
 
 static Bool