From http://www.jwz.org/xscreensaver/xscreensaver-5.22.tar.gz
[xscreensaver] / hacks / moire2.c
index 72a2f4f23a2cd5a3069ffa0cd90a9d1c9d82f0f3..69bfe696089af92d48fd08ef122e4c3a606fb305 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1997, 1998, 2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1997-2013 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -64,7 +64,8 @@ moire2_init_1 (struct state *st)
   if (mono_p)
     ;
   else
-    make_smooth_colormap (st->dpy, xgwa.visual, xgwa.colormap, st->colors, &st->ncolors,
+    make_smooth_colormap (xgwa.screen, xgwa.visual, xgwa.colormap,
+                          st->colors, &st->ncolors,
                          True, 0, True);
 
   st->bg_pixel = get_pixel_resource(st->dpy,
@@ -306,6 +307,8 @@ static void
 moire2_reshape (Display *dpy, Window window, void *closure, 
                  unsigned int w, unsigned int h)
 {
+  struct state *st = (struct state *) closure;
+  st->reset = 1;
 }
 
 static Bool
@@ -326,6 +329,9 @@ static const char *moire2_defaults [] = {
   "*thickness:         0",
   "*colors:            150",
   "*colorShift:                5",
+#ifdef USE_IPHONE
+  "*ignoreRotation:     True",
+#endif
 
 #ifdef HAVE_DOUBLE_BUFFER_EXTENSION
   /* Off by default, since it slows it down a lot, and the flicker isn't really