X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fimsmap.c;h=f329a86cb369567394a2b840a3654eeb5572b585;hb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;hp=aeee0308526344d65c48482e31d6450bfea1b0f4;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/imsmap.c b/hacks/imsmap.c index aeee0308..f329a86c 100644 --- a/hacks/imsmap.c +++ b/hacks/imsmap.c @@ -1,4 +1,4 @@ -/* imsmap, Copyright (c) 1992-2008 Juergen Nickelsen and Jamie Zawinski. +/* imsmap, Copyright (c) 1992-2013 Juergen Nickelsen and Jamie Zawinski. * Derived from code by Markus Schirmer, TU Berlin. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -162,7 +162,7 @@ init_map (struct state *st) if (mono_p) st->flip_xy = 0; else if (st->colors) - free_colors (st->dpy, st->cmap, st->colors, st->ncolors); + free_colors (st->xgwa.screen, st->cmap, st->colors, st->ncolors); st->colors = 0; st->ncolors = get_integer_resource (st->dpy, "ncolors", "Integer"); @@ -188,7 +188,7 @@ init_map (struct state *st) { st->colors = (XColor *) malloc (st->ncolors * sizeof(*st->colors)); - make_smooth_colormap (st->dpy, st->xgwa.visual, st->cmap, + make_smooth_colormap (st->xgwa.screen, st->xgwa.visual, st->cmap, st->colors, &st->ncolors, True, 0, False); if (st->ncolors <= 2) @@ -372,7 +372,7 @@ static Bool imsmap_event (Display *dpy, Window window, void *closure, XEvent *event) { struct state *st = (struct state *) closure; - if (event->xany.type == ButtonPress) + if (screenhack_event_helper (dpy, window, event)) { init_map (st); return True; @@ -401,6 +401,9 @@ static const char *imsmap_defaults [] = { "*iterations: 7", "*delay: 5", "*delay2: 20000", +#ifdef USE_IPHONE + "*ignoreRotation: True", +#endif 0 };