X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Floop.c;h=f5ce869d36ec60487bce41f64620c4d9b4b41e9b;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=7add6d27e7cb899ea1d52e58829294c8052023bc;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/loop.c b/hacks/loop.c index 7add6d27..f5ce869d 100644 --- a/hacks/loop.c +++ b/hacks/loop.c @@ -79,7 +79,7 @@ static const char sccsid[] = "@(#)loop.c 5.01 2000/03/15 xlockmore"; there is handedness at both the initial condition and the transition rule. */ -#ifndef HAVE_COCOA +#ifndef HAVE_JWXYZ # define DO_STIPPLE #endif @@ -89,10 +89,11 @@ static const char sccsid[] = "@(#)loop.c 5.01 2000/03/15 xlockmore"; "*count: -5 \n" \ "*cycles: 1600 \n" \ "*size: -12 \n" \ - "*ncolors: 15 \n" + "*ncolors: 15 \n" \ + "*fpsSolid: true \n" \ + "*ignoreRotation: True \n" \ + # define UNIFORM_COLORS -# define reshape_loop 0 -# define loop_handle_event 0 # include "xlockmore.h" /* in xscreensaver distribution */ #else /* STANDALONE */ # include "xlock.h" /* in xlockmore distribution */ @@ -1676,6 +1677,13 @@ draw_loop (ModeInfo * mi) } } +ENTRYPOINT void +reshape_loop(ModeInfo * mi, int width, int height) +{ + XClearWindow (MI_DISPLAY (mi), MI_WINDOW(mi)); + init_loop (mi); +} + ENTRYPOINT void refresh_loop (ModeInfo * mi) { @@ -1690,6 +1698,17 @@ refresh_loop (ModeInfo * mi) lp->redrawpos = lp->by * lp->ncols + lp->bx; } +ENTRYPOINT Bool +loop_handle_event (ModeInfo *mi, XEvent *event) +{ + if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event)) + { + reshape_loop (mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + return True; + } + return False; +} + XSCREENSAVER_MODULE ("Loop", loop) #endif /* MODE_loop */