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.22.tar.gz
[xscreensaver]
/
hacks
/
goop.c
diff --git
a/hacks/goop.c
b/hacks/goop.c
index d2308386d6551101aecb180cbca173740c16c0dc..f7229cce153fa7b4ee3cda37c1f1a636845d5406 100644
(file)
--- a/
hacks/goop.c
+++ b/
hacks/goop.c
@@
-339,7
+339,9
@@
make_goop (Screen *screen, Visual *visual, Window window, Colormap cmap,
goop->nlayers = get_integer_resource (dpy, "planes", "Planes");
if (goop->nlayers <= 0)
goop->nlayers = (random() % (depth-2)) + 2;
goop->nlayers = get_integer_resource (dpy, "planes", "Planes");
if (goop->nlayers <= 0)
goop->nlayers = (random() % (depth-2)) + 2;
- goop->layers = (struct layer **) malloc(sizeof(*goop->layers)*goop->nlayers);
+ if (! goop->layers)
+ goop->layers = (struct layer **)
+ malloc(sizeof(*goop->layers)*goop->nlayers);
goop->additive_p = get_boolean_resource (dpy, "additive", "Additive");
goop->cmap_p = has_writable_cells (screen, visual);
goop->additive_p = get_boolean_resource (dpy, "additive", "Additive");
goop->cmap_p = has_writable_cells (screen, visual);
@@
-542,7
+544,11
@@
static void
goop_reshape (Display *dpy, Window window, void *closure,
unsigned int w, unsigned int h)
{
goop_reshape (Display *dpy, Window window, void *closure,
unsigned int w, unsigned int h)
{
- /* #### write me */
+ struct goop *goop = (struct goop *) closure;
+
+ /* #### leaks like crazy */
+ struct goop *goop2 = goop_init (dpy, window);
+ memcpy (goop, goop2, sizeof(*goop));
}
static Bool
}
static Bool
@@
-571,6
+577,9
@@
static const char *goop_defaults [] = {
"*torque: 0.0075",
"*elasticity: 0.9",
"*maxVelocity: 0.5",
"*torque: 0.0075",
"*elasticity: 0.9",
"*maxVelocity: 0.5",
+#ifdef USE_IPHONE
+ "*ignoreRotation: True",
+#endif
0
};
0
};