X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fxrayswarm.c;h=464fa7a601cc0f7a25c5e8487179a41237496fbd;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=9b9faef799d9b53658c5c9bbade18c6a6cb63def;hpb=50be9bb40dc60130c99ffa568e6677779904ff70;p=xscreensaver diff --git a/hacks/xrayswarm.c b/hacks/xrayswarm.c index 9b9faef7..464fa7a6 100644 --- a/hacks/xrayswarm.c +++ b/hacks/xrayswarm.c @@ -49,7 +49,7 @@ from the X Consortium. #include #include "screenhack.h" -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ # define HAVE_GETTIMEOFDAY 1 #endif @@ -63,6 +63,9 @@ static const char *xrayswarm_defaults [] ={ ".background: black", "*delay: 20000", "*fpsSolid: true", +#ifdef HAVE_MOBILE + "*ignoreRotation: True", +#endif 0 }; @@ -299,7 +302,7 @@ static int initGraphics(struct state *st) xgcv.foreground=get_pixel_resource (st->dpy, cmap, "background", "Background"); st->fgc[0]=XCreateGC(st->dpy, st->win, GCForeground|GCFunction,&xgcv); -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ jwxyz_XSetAntiAliasing (st->dpy, st->fgc[0], False); #endif @@ -307,7 +310,7 @@ static int initGraphics(struct state *st) if (mono_p) { xgcv.foreground=get_pixel_resource (st->dpy, cmap, "foreground", "Foreground"); st->fgc[1]=XCreateGC(st->dpy,st->win,GCForeground|GCFunction,&xgcv); -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ jwxyz_XSetAntiAliasing (st->dpy, st->fgc[1], False); #endif for (i=0;inumColors;i+=2) st->fgc[i]=st->fgc[0]; @@ -321,14 +324,14 @@ static int initGraphics(struct state *st) XAllocColor(st->dpy,cmap,&color); xgcv.foreground=color.pixel; st->fgc[i] = XCreateGC(st->dpy, st->win, GCForeground | GCFunction,&xgcv); -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ jwxyz_XSetAntiAliasing (st->dpy, st->fgc[i], False); #endif } } st->cgc = XCreateGC(st->dpy,st->win,GCForeground|GCFunction,&xgcv); XSetGraphicsExposures(st->dpy,st->cgc,False); -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ jwxyz_XSetAntiAliasing (st->dpy, st->cgc, False); #endif @@ -1196,6 +1199,12 @@ static void xrayswarm_reshape (Display *dpy, Window window, void *closure, unsigned int w, unsigned int h) { + struct state *st = (struct state *) closure; + st->xsize = w; + st->ysize = h; + st->xc = st->xsize >> 1; + st->yc = st->ysize >> 1; + st->maxy = st->ysize/(float)st->xsize; } static Bool