X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fdrift.c;h=6e5399fea4f7eb14fea62ecdc0f13534895a61ae;hb=14463b6ad1ab1ccf81f9c33350b048e410ba94cb;hp=395a1ec5099d1ed880107eee80af921d72f7b035;hpb=f3e0240915ed9f9b3a61781f5c7002d587563fe0;p=xscreensaver diff --git a/hacks/drift.c b/hacks/drift.c index 395a1ec5..6e5399fe 100644 --- a/hacks/drift.c +++ b/hacks/drift.c @@ -20,7 +20,7 @@ static const char sccsid[] = "@(#)drift.c 4.02 97/04/01 xlockmore"; * other special, indirect and consequential damages. * * Revision History: - * 10-May-97: jwz@netscape.com: turned into a standalone program. + * 10-May-97: jwz@jwz.org: turned into a standalone program. * 01-Jan-97: Moved new flame to drift. Compile time options now run time. * 01-Jun-95: Updated by Scott Draves. * 27-Jun-91: vary number of functions used. @@ -38,6 +38,7 @@ static const char sccsid[] = "@(#)drift.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 */ @@ -221,7 +222,6 @@ initmode(ModeInfo * mi, int mode) dp->fractal_len = 2000000; } dp->fractal_len = (dp->fractal_len * MI_BATCHCOUNT(mi)) / 20; - XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); } @@ -581,8 +581,14 @@ draw_drift(ModeInfo * mi) draw(mi, dp, window); if (dp->total_points++ > dp->fractal_len) { draw_flush(mi, dp, window); - if (0 == --dp->nfractals) - initmode(mi, frandom(2)); + if (0 == --dp->nfractals) { +#ifdef STANDALONE + XSync(MI_DISPLAY(mi), False); + sleep(4); /* #### make settable */ + erase_full_window(MI_DISPLAY(mi), MI_WINDOW(mi)); +#endif /* STANDALONE */ + initmode(mi, frandom(2)); + } initfractal(mi); } dp->timer--;