X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fanemone.c;h=9f65145aff3985916964a63c3816630b4e76bdd0;hb=refs%2Fremotes%2Fgithub%2Fmaster2;hp=0cf342ea4c1d4f27c9c5712ef89c583f64673026;hpb=50be9bb40dc60130c99ffa568e6677779904ff70;p=xscreensaver diff --git a/hacks/anemone.c b/hacks/anemone.c index 0cf342ea..9f65145a 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 @@ -211,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); @@ -380,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 @@ -416,6 +426,9 @@ static const char *anemone_defaults [] = { #ifdef HAVE_DOUBLE_BUFFER_EXTENSION "*useDBE: True", #endif /* HAVE_DOUBLE_BUFFER_EXTENSION */ +#ifdef USE_IPHONE + "*ignoreRotation: True", +#endif 0 };