X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fcynosure.c;h=9a4318b7cdce04b3e120891c3b51d5ac7ef8be43;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=baf3be43562d6e8c0d1faad58ad6df254ac1d751;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/cynosure.c b/hacks/cynosure.c index baf3be43..9a4318b7 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; } @@ -418,6 +425,9 @@ static const char *cynosure_defaults [] = { "*sway: 30", "*tweak: 20", "*gridSize: 12", +#ifdef HAVE_MOBILE + "*ignoreRotation: True", +#endif 0 };