X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Ftestx11.c;h=cc2162111171ff5bdef371fb0248fc62c15d1bb8;hp=17732d7b6fe9552a3378f44f2382125be135098f;hb=refs%2Fheads%2Fmaster;hpb=78add6e627ee5f10e1fa6f3852602ea5066eee5a diff --git a/hacks/testx11.c b/hacks/testx11.c index 17732d7b..cc216211 100644 --- a/hacks/testx11.c +++ b/hacks/testx11.c @@ -370,7 +370,8 @@ backdrop (struct testx11 *st, Drawable t) const float s0 = 2 * M_PI / tile_count; float y_fac = sin ((y + st->frame / 16.0) * s0); for (x = 0; x != tile_count; ++x) { - unsigned c = ((sin ((x + st->frame / 8.0) * s0) * y_fac) - 1) / 2 * st->backdrop_ncolors / 2; + int c = ((sin ((x + st->frame / 8.0) * s0) * y_fac) - 1) / 2 * + st->backdrop_ncolors / 2; c = (c + st->frame) % st->backdrop_ncolors; XSetBackground (st->dpy, st->backdrop_black_gc, st->backdrop_colors[c].pixel);