X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fdrift.c;fp=hacks%2Fdrift.c;h=508707088d5ba1d82d46ece0538aefbefe5f75ef;hb=5b7bc6e70fb439cf4c4bf771ae9f94077fe4fe08;hp=395a1ec5099d1ed880107eee80af921d72f7b035;hpb=186b0b9f1638444c650c9273df38085e0db71e4a;p=xscreensaver diff --git a/hacks/drift.c b/hacks/drift.c index 395a1ec5..50870708 100644 --- a/hacks/drift.c +++ b/hacks/drift.c @@ -35,9 +35,12 @@ static const char sccsid[] = "@(#)drift.c 4.02 97/04/01 xlockmore"; # define drift_opts xlockmore_opts # define DEFAULTS "*count: 30 \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 */ @@ -221,7 +224,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 +583,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--;