X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fanemotaxis.c;h=9f240e8f9d13434d7361fca57c656e34a3b77818;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hp=1f3a859d84de052d4f33ba0f78a911665e177625;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/anemotaxis.c b/hacks/anemotaxis.c index 1f3a859d..9f240e8f 100644 --- a/hacks/anemotaxis.c +++ b/hacks/anemotaxis.c @@ -379,7 +379,8 @@ anemotaxis_init (Display *disp, Window win) st->ncolors = get_integer_resource (st->dpy, "colors", "Colors"); st->ncolors++; st->colors = (XColor *) malloc(sizeof(*st->colors) * (st->ncolors+1)); - make_random_colormap (st->dpy, wa.visual, wa.colormap, st->colors, &st->ncolors, + make_random_colormap (wa.screen, wa.visual, wa.colormap, + st->colors, &st->ncolors, True, True, 0, True); st->delay = get_integer_resource(st->dpy, "delay", "Integer"); @@ -402,7 +403,7 @@ anemotaxis_init (Display *disp, Window win) st->dbuf = True; -# ifdef HAVE_COCOA /* Don't second-guess Quartz's double-buffering */ +# ifdef HAVE_JWXYZ /* Don't second-guess Quartz's double-buffering */ st->dbuf = False; # endif @@ -510,13 +511,15 @@ static void draw_image(struct state *st, Drawable curr_window) for(j = 0; j < st->source[i]->n; j++) { + int size = (st->scrWidth > 2560 ? 8 : 4); /* Retina displays */ + if(st->source[i]->yv[j].v == 2) continue; /* Move the particles slightly off lattice */ x = X(st->source[i]->r.x + 1 + j) + RND(st->dx); y = Y(st->source[i]->r.y + st->source[i]->yv[j].y) + RND(st->dy); - XFillArc(st->dpy, curr_window, st->gcDraw, x - 2, y - 2, 4, 4, 0, 360 * 64); + XFillArc(st->dpy, curr_window, st->gcDraw, x - size/2, y - size/2, size, size, 0, 360 * 64); } }