ftp://ftp.demon.nl/disk1/redhat-contrib/libc5/SRPMS/xscreensaver-2.14-1.src.rpm
[xscreensaver] / hacks / hopalong.c
index 8b56155de8093a87304019b2d64dc2643b65369f..7d290f2d6bb8073a75bab7429b9e440a0a59fac8 100644 (file)
@@ -55,9 +55,12 @@ static const char sccsid[] = "@(#)hop.c      4.02 97/04/01 xlockmore";
 # define DEFAULTS      "*count:                1000    \n"                     \
                                        "*cycles:               2500    \n"                     \
                                        "*delay:                10000   \n"                     \
-                                       "*ncolors:              200     \n"
+                                       "*ncolors:              200     \n"                     \
+                                       "*eraseSpeed:   400 \n"                         \
+                                       "*eraseMode:    -1 \n"
 # define SMOOTH_COLORS
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
+# include "erase.h"
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
 #endif /* !STANDALONE */
@@ -231,8 +234,12 @@ draw_hop(ModeInfo * mi)
        }
        XDrawPoints(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi),
                    pointBuffer, hp->bufsize, CoordModeOrigin);
-       if (++hp->count > MI_CYCLES(mi))
-               init_hop(mi);
+       if (++hp->count > MI_CYCLES(mi)) {
+#ifdef STANDALONE
+         erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi));
+#endif /* STANDALONE */
+         init_hop(mi);
+       }
 }
 
 void