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.37.tar.gz
[xscreensaver]
/
hacks
/
slip.c
diff --git
a/hacks/slip.c
b/hacks/slip.c
index e0b0ea4fa72c268ce3b3e133816ce52891ae252a..6537086b731aab668da321c51a8709b7a2dcaea4 100644
(file)
--- a/
hacks/slip.c
+++ b/
hacks/slip.c
@@
-31,10
+31,11
@@
static const char sccsid[] = "@(#)slip.c 5.00 2000/11/01 xlockmore";
"*count: 35 \n" \
"*cycles: 50 \n" \
"*ncolors: 200 \n" \
"*count: 35 \n" \
"*cycles: 50 \n" \
"*ncolors: 200 \n" \
- "*fpsSolid: true \n"
+ "*fpsSolid: true \n" \
+ "*ignoreRotation: True \n" \
# define refresh_slip 0
# define refresh_slip 0
-# define
slip_handle_event
0
+# define
release_slip
0
# include "xlockmore.h" /* in xscreensaver distribution */
#else /* STANDALONE */
# include "xlock.h" /* in xlockmore distribution */
# include "xlockmore.h" /* in xscreensaver distribution */
#else /* STANDALONE */
# include "xlock.h" /* in xlockmore distribution */
@@
-47,7
+48,7
@@
ENTRYPOINT ModeSpecOpt slip_opts =
#ifdef USE_MODULES
ModStruct slip_description =
#ifdef USE_MODULES
ModStruct slip_description =
-{"slip", "init_slip", "draw_slip",
"release_slip"
,
+{"slip", "init_slip", "draw_slip",
(char *) NULL
,
"init_slip", "init_slip", (char *) NULL, &slip_opts,
50000, 35, 50, 1, 64, 1.0, "",
"Shows slipping blits", 0, NULL};
"init_slip", "init_slip", (char *) NULL, &slip_opts,
50000, 35, 50, 1, 64, 1.0, "",
"Shows slipping blits", 0, NULL};
@@
-210,11
+211,7
@@
init_slip (ModeInfo * mi)
{
slipstruct *sp;
{
slipstruct *sp;
- if (slips == NULL) {
- if ((slips = (slipstruct *) calloc(MI_NUM_SCREENS(mi),
- sizeof (slipstruct))) == NULL)
- return;
- }
+ MI_INIT (mi, slips, 0);
sp = &slips[MI_SCREEN(mi)];
sp->nblits_remaining = 0;
sp = &slips[MI_SCREEN(mi)];
sp->nblits_remaining = 0;
@@
-353,13
+350,17
@@
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
}
}
}
}
-ENTRYPOINT
void
-
release_slip (ModeInfo * mi
)
+ENTRYPOINT
Bool
+
slip_handle_event (ModeInfo *mi, XEvent *event
)
{
{
- if (slips != NULL) {
- (void) free((void *) slips);
- slips = (slipstruct *) NULL;
- }
+ slipstruct *sp = &slips[MI_SCREEN(mi)];
+ if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event))
+ {
+ sp->first_time = 1;
+ sp->nblits_remaining = 0;
+ return True;
+ }
+ return False;
}
XSCREENSAVER_MODULE ("Slip", slip)
}
XSCREENSAVER_MODULE ("Slip", slip)