X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fcynosure.c;h=8b8b85b94915d9de156885c8ea2967f5ce4da6eb;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hp=8fd2a94e8df4b62d0b4eebf19bec6b066a4622da;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/cynosure.c b/hacks/cynosure.c index 8fd2a94e..8b8b85b9 100644 --- a/hacks/cynosure.c +++ b/hacks/cynosure.c @@ -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; @@ -154,7 +155,7 @@ cynosure_init (Display *d, Window w) #else /* !DO_STIPPLE */ st->shadow_gc = XCreateGC(st->dpy, st->window, GCForeground, &gcv); -# ifdef HAVE_COCOA /* allow non-opaque alpha components in pixel values */ +# ifdef HAVE_JWXYZ /* allow non-opaque alpha components in pixel values */ jwxyz_XSetAlphaAllowed (st->dpy, st->shadow_gc, True); # endif @@ -166,14 +167,14 @@ cynosure_init (Display *d, Window w) for (i = 0; i < st->ncolors2; i++) { -# ifdef HAVE_COCOA +# ifdef HAVE_JWXYZ /* give a non-opaque alpha to the shadow colors */ unsigned long pixel = st->colors[i].pixel; unsigned long amask = BlackPixelOfScreen (st->xgwa.screen); unsigned long a = (0x77777777 & amask); pixel = (pixel & (~amask)) | a; st->colors2[i].pixel = pixel; -# else /* !HAVE_COCOA */ +# else /* !HAVE_JWXYZ */ int h; double s, v; rgb_to_hsv (st->colors[i].red, @@ -187,7 +188,7 @@ cynosure_init (Display *d, Window w) &st->colors2[i].blue); st->colors2[i].pixel = st->colors[i].pixel; XAllocColor (st->dpy, st->xgwa.colormap, &st->colors2[i]); -# endif /* !HAVE_COCOA */ +# endif /* !HAVE_JWXYZ */ } } # endif /* !DO_STIPPLE */ @@ -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; } @@ -409,6 +416,8 @@ cynosure_free (Display *dpy, Window window, void *closure) static const char *cynosure_defaults [] = { ".background: black", ".foreground: white", + ".lowrez: true", + "*fpsSolid: true", "*delay: 500000", "*colors: 128", "*iterations: 100", @@ -417,6 +426,9 @@ static const char *cynosure_defaults [] = { "*sway: 30", "*tweak: 20", "*gridSize: 12", +#ifdef HAVE_MOBILE + "*ignoreRotation: True", +#endif 0 };