From http://www.jwz.org/xscreensaver/xscreensaver-5.22.tar.gz
[xscreensaver] / hacks / wander.c
index 9cdd090bd182a4ba06b0ac0afd2b0e5a277a43d9..881b92cc0b479c10de751670b5e0a66cf5b3d895 100644 (file)
@@ -64,12 +64,13 @@ wander_init (Display *dpy, Window window)
     st->color_map = attributes.colormap;
     if (st->color_count)
     {
-        free_colors (st->dpy, st->color_map, st->colors, st->color_count);
+        free_colors (attributes.screen, st->color_map,
+                     st->colors, st->color_count);
         st->color_count = 0;
     }
     st->context = XCreateGC (st->dpy, st->window, 0, &values);
     st->color_count = MAXIMUM_COLOR_COUNT;
-    make_color_loop (st->dpy, st->color_map,
+    make_color_loop (attributes.screen, attributes.visual, st->color_map,
                     0,   1, 1,
                     120, 1, 1,
                     240, 1, 1,
@@ -210,6 +211,11 @@ static void
 wander_reshape (Display *dpy, Window window, void *closure, 
                  unsigned int w, unsigned int h)
 {
+  struct state *st = (struct state *) closure;
+  st->width  = w / st->size;
+  st->height = h / st->size;
+  st->width_1  = st->width - 1;
+  st->height_1 = st->height - 1;
 }
 
 static Bool
@@ -227,6 +233,7 @@ static const char *wander_defaults [] =
 {
     ".background: black",
     ".foreground: white",
+    ".fpsSolid:          true",
     ".advance:    1",
     ".density:    2",
     ".length:     25000",
@@ -234,6 +241,9 @@ static const char *wander_defaults [] =
     ".reset:      2500000",
     ".circles:    False",
     ".size:       1",
+#ifdef USE_IPHONE
+  "*ignoreRotation: True",
+#endif
     0
 };