X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fgalaxy.c;h=b8fbd0c4ce8db57ba5a251fa46b4b8be2ee40706;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=f060591c0eed2a8b6d930d9d21db7caf57e1f63d;hpb=de460e831dc8578acfa8b72251ab9346c99c1f96;p=xscreensaver diff --git a/hacks/galaxy.c b/hacks/galaxy.c index f060591c..b8fbd0c4 100644 --- a/hacks/galaxy.c +++ b/hacks/galaxy.c @@ -43,10 +43,11 @@ static const char sccsid[] = "@(#)galaxy.c 4.04 97/07/28 xlockmore"; # define DEFAULTS "*delay: 20000 \n" \ "*count: -5 \n" \ "*cycles: 250 \n" \ - "*ncolors: 64 \n" + "*ncolors: 64 \n" \ + "*fpsSolid: true \n" \ + "*ignoreRotation: True \n" \ + # define UNIFORM_COLORS -# define reshape_galaxy 0 -# define galaxy_handle_event 0 # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ # include "xlock.h" /* from the xlockmore distribution */ @@ -312,7 +313,7 @@ init_galaxy(ModeInfo * mi) } gp = &universes[MI_SCREEN(mi)]; -# ifdef HAVE_COCOA /* Don't second-guess Quartz's double-buffering */ +# ifdef HAVE_JWXYZ /* Don't second-guess Quartz's double-buffering */ dbufp = False; # endif @@ -438,6 +439,13 @@ draw_galaxy(ModeInfo * mi) startover(mi); } +ENTRYPOINT void +reshape_galaxy(ModeInfo * mi, int width, int height) +{ + XClearWindow (MI_DISPLAY (mi), MI_WINDOW(mi)); + init_galaxy (mi); +} + ENTRYPOINT void release_galaxy(ModeInfo * mi) { @@ -457,4 +465,16 @@ refresh_galaxy(ModeInfo * mi) /* Do nothing, it will refresh by itself */ } +ENTRYPOINT Bool +galaxy_handle_event (ModeInfo *mi, XEvent *event) +{ + if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event)) + { + reshape_galaxy (mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + return True; + } + return False; +} + + XSCREENSAVER_MODULE ("Galaxy", galaxy)