http://ftp.x.org/contrib/applications/xscreensaver-2.16.tar.gz
[xscreensaver] / hacks / forest.c
index 881fe779e28828881587de5cddf54f2cd8ee58ab..54fe80739b9e4f62c8b3f83e614bbea1558c42eb 100644 (file)
@@ -36,6 +36,7 @@ static const char sccsid[] = "@(#)forest.c    4.03 97/05/10 xlockmore";
                                        "*ncolors:              100     \n"
 # define UNIFORM_COLORS
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
+# include "erase.h"
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
 #endif /* !STANDALONE */
@@ -181,8 +182,12 @@ draw_forest(ModeInfo * mi)
 
                draw_tree(mi, x_2, y_2, (len * REDUCE) / 100, a, as, c, 1);
        }
-       if (++fp->time > MI_CYCLES(mi))
-               init_forest(mi);
+       if (++fp->time > MI_CYCLES(mi)) {
+#ifdef STANDALONE
+         erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
+#endif /* STANDALONE */
+         init_forest(mi);
+       }
 }
 
 void