From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / hacks / ccurve.c
index 6f547bea4f51ed2b46849d14e64455081a86364a..23b53e84da9f2bfdb92344fa646cba5239c8ea19 100644 (file)
@@ -701,7 +701,8 @@ ccurve_init (Display *dpy, Window window)
     st->context = XCreateGC (st->dpy, st->window, GCForeground | GCBackground,
                         &values);
     st->color_count = MAXIMUM_COLOR_COUNT;
-    make_color_loop (st->dpy, st->color_map,
+    make_color_loop (hack_attributes.screen, hack_attributes.visual,
+                     st->color_map,
                     0,   1, 1,
                     120, 1, 1,
                     240, 1, 1,
@@ -826,6 +827,12 @@ ccurve_reshape (Display *dpy, Window window, void *closure,
 static Bool
 ccurve_event (Display *dpy, Window window, void *closure, XEvent *event)
 {
+  struct state *st = (struct state *) closure;
+  if (screenhack_event_helper (dpy, window, event))
+    {
+      st->draw_index = 0;
+      return True;
+    }
   return False;
 }
 
@@ -842,6 +849,9 @@ static const char *ccurve_defaults [] =
     ".delay:      3",
     ".pause:      0.4",
     ".limit: 200000",
+#ifdef HAVE_MOBILE
+    "*ignoreRotation: True",
+#endif
     0
 };