projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.30.tar.gz
[xscreensaver]
/
hacks
/
galaxy.c
diff --git
a/hacks/galaxy.c
b/hacks/galaxy.c
index 6a72738e508dda81b089ba216c6e082809ff7e97..2aeeb6f30f0cc11640d7088d1eb6acb1f83c9af1 100644
(file)
--- a/
hacks/galaxy.c
+++ b/
hacks/galaxy.c
@@
-45,10
+45,9
@@
static const char sccsid[] = "@(#)galaxy.c 4.04 97/07/28 xlockmore";
"*cycles: 250 \n" \
"*ncolors: 64 \n" \
"*fpsSolid: true \n" \
"*cycles: 250 \n" \
"*ncolors: 64 \n" \
"*fpsSolid: true \n" \
+ "*ignoreRotation: True \n" \
# define UNIFORM_COLORS
# 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 */
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
# include "xlock.h" /* from the xlockmore distribution */
@@
-440,6
+439,13
@@
draw_galaxy(ModeInfo * mi)
startover(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)
{
ENTRYPOINT void
release_galaxy(ModeInfo * mi)
{
@@
-459,4
+465,16
@@
refresh_galaxy(ModeInfo * mi)
/* Do nothing, it will refresh by itself */
}
/* 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)
XSCREENSAVER_MODULE ("Galaxy", galaxy)