XImage *orig_map, *buffer_map;
int ctab[256];
Colormap colormap;
+ Screen *screen;
int ncolors;
int light;
XGetWindowAttributes(st->dpy, st->window, &xgwa);
depth = xgwa.depth;
st->colormap = xgwa.colormap;
+ st->screen = xgwa.screen;
st->bigwidth = xgwa.width;
st->bigheight = xgwa.height;
st->visual = xgwa.visual;
st->img_loader = load_image_async_simple (0, xgwa.screen, st->window,
st->window, 0, 0);
- st->start_time = time ((time_t) 0);
+ st->start_time = time ((time_t *) 0);
} else {
XGCValues gcv;
if (!mono_p) {
colors = (XColor *)malloc(sizeof(*colors) * (st->ncolors+1));
- make_smooth_colormap(st->dpy, st->visual, st->colormap, colors, &st->ncolors,
+ make_smooth_colormap(st->screen, st->visual, st->colormap,
+ colors, &st->ncolors,
True, /* allocate */
False, /* not writable */
True); /* verbose (complain about failure) */
int i;
i = (int)(x * TABLE + 0.5);
if (i >= TABLE) i = (TABLE-1) - (i-(TABLE-1));
+ if (i < 0) return 0.;
return st->cos_tab[i];
#elif 0
return cos(x * M_PI/2);
r = cx*cx + cy*cy;
if (r > r2) break;
buf[xx + yy*st->width] =
- (short)(dheight * sinc(st, sqrt(r)/radius));
+ (short)(dheight * sinc(st, (radius > 0) ? sqrt(r)/radius : 0));
}
}
if (! st->img_loader) { /* just finished */
XWindowAttributes xgwa;
XGetWindowAttributes(st->dpy, st->window, &xgwa);
- st->start_time = time ((time_t) 0);
+ st->start_time = time ((time_t *) 0);
st->orig_map = XGetImage (st->dpy, st->window, 0, 0,
xgwa.width, xgwa.height,
~0L, ZPixmap);
}
if (!st->img_loader &&
- st->start_time + st->duration < time ((time_t) 0)) {
+ st->start_time + st->duration < time ((time_t *) 0)) {
XWindowAttributes xgwa;
XGetWindowAttributes(st->dpy, st->window, &xgwa);
st->img_loader = load_image_async_simple (0, xgwa.screen, st->window,
st->window, 0, 0);
- st->start_time = time ((time_t) 0);
+ st->start_time = time ((time_t *) 0);
return st->delay;
}
static Bool
ripples_event (Display *dpy, Window window, void *closure, XEvent *event)
{
+ struct state *st = (struct state *) closure;
+ if (screenhack_event_helper (dpy, window, event))
+ {
+ st->start_time = 0;
+ return True;
+ }
return False;
}
"*useSHM: True",
#else
"*useSHM: False",
+#endif
+#ifdef HAVE_MOBILE
+ "*ignoreRotation: True",
+ "*rotateImages: True",
#endif
0
};