http://ftp.x.org/contrib/applications/xscreensaver-2.34.tar.gz
[xscreensaver] / hacks / hopalong.c
index 8b56155de8093a87304019b2d64dc2643b65369f..c762a162f71b044f7a6c4d43538c7998cb0b05ec 100644 (file)
@@ -21,7 +21,7 @@ static const char sccsid[] = "@(#)hop.c       4.02 97/04/01 xlockmore";
  *
  * Revision History:
  * Changes of David Bagley <bagleyd@bigfoot.com>
- * 10-May-97: jwz@netscape.com: ported from xlockmore 4.03a10 to be a 
+ * 10-May-97: jwz@jwz.org: ported from xlockmore 4.03a10 to be a 
  *                       standalone program and thus usable with xscreensaver
  *                       (I threw away my 1992 port and started over.)
  * 27-Jul-95: added Peter de Jong's hop from Scientific American
@@ -58,6 +58,7 @@ static const char sccsid[] = "@(#)hop.c       4.02 97/04/01 xlockmore";
                                        "*ncolors:              200     \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 +232,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