X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fxlyap.c;h=f12b354775e4ac75ad2dc8f45ca68d8672eef57b;hb=8afc01a67be4fbf3f1cc0fce9adf01b5289a21c6;hp=d78b81b095993f523c18bc40636e4f19c2d5ba52;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/xlyap.c b/hacks/xlyap.c index d78b81b0..f12b3547 100644 --- a/hacks/xlyap.c +++ b/hacks/xlyap.c @@ -50,6 +50,7 @@ static const char *xlyap_defaults [] = { ".background: black", ".foreground: white", + "*fpsSolid: true", "*randomize: true", "*builtin: -1", "*minColor: 1", @@ -77,6 +78,9 @@ static const char *xlyap_defaults [] = { "*delay: 10000", "*linger: 5", "*colors: 200", +#ifdef USE_IPHONE + "*ignoreRotation: True", +#endif 0 }; @@ -177,8 +181,8 @@ typedef double (*PFD)(double,double); /*#define BACKING_PIXMAP*/ struct state { - int screen; Display *dpy; + Screen *screen; Visual *visual; Colormap cmap; @@ -551,15 +555,15 @@ init_color(struct state *st) { int i; if (st->ncolors) - free_colors (st->dpy, st->cmap, st->colors, st->ncolors); + free_colors (st->screen, st->cmap, st->colors, st->ncolors); st->ncolors = st->maxcolor; - make_smooth_colormap(st->dpy, st->visual, st->cmap, + make_smooth_colormap(st->screen, st->visual, st->cmap, st->colors, &st->ncolors, True, NULL, True); for (i = 0; i < st->maxcolor; i++) { if (! st->Data_GC[i]) { XGCValues gcv; - gcv.background = BlackPixel(st->dpy, st->screen); + gcv.background = BlackPixelOfScreen(st->screen); st->Data_GC[i] = XCreateGC(st->dpy, st->canvas, GCBackground, &gcv); } XSetForeground(st->dpy, st->Data_GC[i], @@ -1236,7 +1240,6 @@ EndRubberBand(struct state *st, image_data_t *data, XEvent *event) data->p_min += diff * delta; delta = (double)(st->width - bot.x) / (double)st->width; data->p_max -= diff * delta; - fflush(stdout); set_new_params(st, data); } @@ -1782,6 +1785,7 @@ xlyap_init (Display *d, Window window) st->width = xgwa.width; st->height = xgwa.height; st->visual = xgwa.visual; + st->screen = xgwa.screen; st->cmap = xgwa.colormap; do_defaults(st); @@ -1799,14 +1803,13 @@ xlyap_init (Display *d, Window window) if (builtin >= 0) do_preset (st, builtin); - st->screen = DefaultScreen(st->dpy); - st->background = BlackPixel(st->dpy, st->screen); + st->background = BlackPixelOfScreen(st->screen); setupmem(st); init_data(st); if (!mono_p) st->foreground = st->startcolor; else - st->foreground = WhitePixel(st->dpy, st->screen); + st->foreground = WhitePixelOfScreen(st->screen); /* * Create the window to display the Lyapunov exponents