X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fcrystal.c;h=9dfa5ea266873d9e953c57d41732aeaf993d6724;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=3acd7caee386f3e211f6e9803ffdf16365d66d0e;hpb=4ade52359b6eba3621566dac79793a33aa4c915f;p=xscreensaver diff --git a/hacks/crystal.c b/hacks/crystal.c index 3acd7cae..9dfa5ea2 100644 --- a/hacks/crystal.c +++ b/hacks/crystal.c @@ -77,7 +77,6 @@ static const char sccsid[] = "@(#)crystal.c 4.12 98/09/10 xlockmore"; "*fpsSolid: True \n" \ "*ignoreRotation: True \n" \ -# define crystal_handle_event 0 # include "xlockmore.h" /* in xscreensaver distribution */ #else /* STANDALONE */ # include "xlock.h" /* in xlockmore distribution */ @@ -568,7 +567,7 @@ draw_crystal(ModeInfo * mi) crystalstruct *cryst = &crystals[MI_SCREEN(mi)]; int i; -#ifdef HAVE_COCOA /* Don't second-guess Quartz's double-buffering */ +#ifdef HAVE_JWXYZ /* Don't second-guess Quartz's double-buffering */ XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi)); #endif @@ -1286,4 +1285,15 @@ reshape_crystal(ModeInfo * mi, int width, int height) init_crystal(mi); } +ENTRYPOINT Bool +crystal_handle_event (ModeInfo *mi, XEvent *event) +{ + if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event)) + { + reshape_crystal (mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + return True; + } + return False; +} + XSCREENSAVER_MODULE ("Crystal", crystal)