From http://www.jwz.org/xscreensaver/xscreensaver-5.34.tar.gz
[xscreensaver] / hacks / cynosure.c
index baf3be43562d6e8c0d1faad58ad6df254ac1d751..5420d14d4fbfdf99503019cc82c9b1efda8c078a 100644 (file)
@@ -125,7 +125,8 @@ cynosure_init (Display *d, Window w)
   if (mono_p)
     ;
   else {
-    make_smooth_colormap (st->dpy, st->xgwa.visual, st->xgwa.colormap, st->colors, &st->ncolors,
+    make_smooth_colormap (st->xgwa.screen, st->xgwa.visual, st->xgwa.colormap,
+                          st->colors, &st->ncolors,
                          True, 0, True);
     if (st->ncolors <= 2) {
       mono_p = True;
@@ -395,6 +396,12 @@ cynosure_reshape (Display *dpy, Window window, void *closure,
 static Bool
 cynosure_event (Display *dpy, Window window, void *closure, XEvent *event)
 {
+  struct state *st = (struct state *) closure;
+  if (screenhack_event_helper (dpy, window, event))
+    {
+      st->i = st->iterations;
+      return True;
+    }
   return False;
 }
 
@@ -418,6 +425,9 @@ static const char *cynosure_defaults [] = {
   "*sway:              30",
   "*tweak:             20",
   "*gridSize:          12",
+#ifdef USE_IPHONE
+  "*ignoreRotation:     True",
+#endif
   0
 };