X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fmountain.c;h=29d842a114f19bd7126e5466b3bd61ebea91962c;hb=refs%2Fremotes%2Fgithub%2Fmaster2;hp=aae435b5886c4ade4eaa3d4be34e2856a2958e05;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/mountain.c b/hacks/mountain.c index aae435b5..29d842a1 100644 --- a/hacks/mountain.c +++ b/hacks/mountain.c @@ -28,13 +28,13 @@ static const char sccsid[] = "@(#)mountain.c 5.00 2000/11/01 xlockmore"; #ifdef STANDALONE # define MODE_mountain -#define DEFAULTS "*delay: 1000 \n" \ +#define DEFAULTS "*delay: 20000 \n" \ "*count: 30 \n" \ "*cycles: 4000 \n" \ - "*ncolors: 64 \n" + "*ncolors: 64 \n" \ + "*fpsSolid: true \n" \ + # define SMOOTH_COLORS -# define reshape_mountain 0 -# define mountain_handle_event 0 # include "xlockmore.h" /* in xscreensaver distribution */ #else /* STANDALONE */ # include "xlock.h" /* in xlockmore distribution */ @@ -253,6 +253,14 @@ draw_mountain (ModeInfo * mi) } } +ENTRYPOINT void +reshape_mountain(ModeInfo * mi, int width, int height) +{ + XClearWindow (MI_DISPLAY (mi), MI_WINDOW(mi)); + init_mountain (mi); +} + + ENTRYPOINT void release_mountain (ModeInfo * mi) { @@ -284,6 +292,17 @@ refresh_mountain(ModeInfo * mi) mp->y = 0; } +ENTRYPOINT Bool +mountain_handle_event (ModeInfo *mi, XEvent *event) +{ + if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event)) + { + init_mountain (mi); + return True; + } + return False; +} + XSCREENSAVER_MODULE ("Mountain", mountain) #endif /* MODE_mountain */