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
/
strange.c
diff --git
a/hacks/strange.c
b/hacks/strange.c
index eba88a90c08f7c53c27b5eb55884373b05afe685..148bbcadcd5820f981ce45eba6c162165c5adf70 100644
(file)
--- a/
hacks/strange.c
+++ b/
hacks/strange.c
@@
-38,12
+38,11
@@
static const char sccsid[] = "@(#)strange.c 5.00 2000/11/01 xlockmore";
# define MODE_strange
# define DEFAULTS "*delay: 10000 \n" \
"*ncolors: 100 \n" \
# define MODE_strange
# define DEFAULTS "*delay: 10000 \n" \
"*ncolors: 100 \n" \
- "*fpsSolid: True \n"
+ "*fpsSolid: True \n" \
+ "*ignoreRotation: True \n" \
# define SMOOTH_COLORS
# define refresh_strange 0
# define SMOOTH_COLORS
# define refresh_strange 0
-# define reshape_strange 0
-# define strange_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 */
@@
-142,7
+141,7
@@
typedef struct _ATTRACTOR {
static ATTRACTOR *Root = (ATTRACTOR *) NULL;
#ifdef useAccumulator
static ATTRACTOR *Root = (ATTRACTOR *) NULL;
#ifdef useAccumulator
-XColor* cols;
+
static
XColor* cols;
#endif
#ifdef POINTS_HISTORY
#endif
#ifdef POINTS_HISTORY
@@
-663,6
+662,13
@@
init_strange(ModeInfo * mi)
XSetGraphicsExposures(display, MI_GC(mi), False);
}
XSetGraphicsExposures(display, MI_GC(mi), False);
}
+ENTRYPOINT void
+reshape_strange(ModeInfo * mi, int width, int height)
+{
+ XClearWindow (MI_DISPLAY (mi), MI_WINDOW(mi));
+ init_strange (mi);
+}
+
/***************************************************************/
ENTRYPOINT void
/***************************************************************/
ENTRYPOINT void
@@
-690,6
+696,18
@@
release_strange(ModeInfo * mi)
}
}
}
}
+ENTRYPOINT Bool
+strange_handle_event (ModeInfo *mi, XEvent *event)
+{
+ if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event))
+ {
+ reshape_strange (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+ return True;
+ }
+ return False;
+}
+
+
XSCREENSAVER_MODULE ("Strange", strange)
#endif /* MODE_strange */
XSCREENSAVER_MODULE ("Strange", strange)
#endif /* MODE_strange */