X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fanemone.c;h=deedb270b659da0c929e426e94c9a6a0ebadc429;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=652e4770659dd4fa780aa7dc65a0ddcdeece5deb;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/anemone.c b/hacks/anemone.c index 652e4770..deedb270 100644 --- a/hacks/anemone.c +++ b/hacks/anemone.c @@ -1,4 +1,4 @@ -/* anemon, Copyright (c) 2001 Gabriel Finch +/* anemone, Copyright (c) 2001 Gabriel Finch * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -152,8 +152,6 @@ initAppendages(struct state *st) st->aCurr->growth = st->finpoints / 2 + RND(st->finpoints / 2); st->aCurr->rate = RND(11) * RND(11); - dist = 1.; - do { x = (1 - RND(1001) / 500); y = (1 - RND(1001) / 500); @@ -195,7 +193,7 @@ anemone_init (Display *disp, Window window) 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 @@ -213,7 +211,8 @@ anemone_init (Display *disp, Window window) st->ncolors = get_integer_resource (st->dpy, "colors", "Colors"); st->ncolors += 3; st->colors = (XColor *) malloc(sizeof(*st->colors) * (st->ncolors+1)); - make_smooth_colormap (st->dpy, wa.visual, st->cmap, st->colors, &st->ncolors, + make_smooth_colormap (wa.screen, wa.visual, st->cmap, + st->colors, &st->ncolors, True, 0, True); st->gcDraw = XCreateGC(st->dpy, window, 0, &st->gcv); @@ -382,11 +381,20 @@ static void anemone_reshape (Display *dpy, Window window, void *closure, unsigned int w, unsigned int h) { - /* need to re-make pixmaps too... struct state *st = (struct state *) closure; st->scrWidth = w; st->scrHeight = h; - */ +#if 0 + if (st->dbuf) { + XWindowAttributes wa; + XGetWindowAttributes(dpy, window, &wa); + if (st->ba) XFreePixmap (dpy, st->ba); + if (st->bb) XFreePixmap (dpy, st->bb); + st->ba = XCreatePixmap (dpy, window, st->scrWidth, st->scrHeight, wa.depth); + st->bb = XCreatePixmap (dpy, window, st->scrWidth, st->scrHeight, wa.depth); + st->b = st->ba; + } +#endif } static Bool @@ -418,6 +426,9 @@ static const char *anemone_defaults [] = { #ifdef HAVE_DOUBLE_BUFFER_EXTENSION "*useDBE: True", #endif /* HAVE_DOUBLE_BUFFER_EXTENSION */ +#ifdef HAVE_MOBILE + "*ignoreRotation: True", +#endif 0 };