X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fspeedmine.c;h=5c67082dad498be231ed5cdbe16c411be053d737;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hp=1ff2db11076c3c7c41340a06085f906e09377048;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/speedmine.c b/hacks/speedmine.c index 1ff2db11..5c67082d 100644 --- a/hacks/speedmine.c +++ b/hacks/speedmine.c @@ -1105,7 +1105,7 @@ render_speedmine (struct state *st, Drawable d) } else { t = MAX(begin_at(st), TERRAIN_LENGTH/4); /*t = TERRAIN_LENGTH/4; dt = 2; */ - dt = (t >= 3*TERRAIN_LENGTH/4 ? 1 : 2); + /*dt = (t >= 3*TERRAIN_LENGTH/4 ? 1 : 2);*/ i = (st->nearest -t + TERRAIN_LENGTH) % TERRAIN_LENGTH; render_block (st, d, st->tunnelend_gc, t); } @@ -1538,6 +1538,16 @@ static void speedmine_reshape (Display *dpy, Window window, void *closure, unsigned int w, unsigned int h) { + struct state *st = (struct state *) closure; + st->width = w; + st->height = h; + if (st->dbuf != st->window) { + XWindowAttributes xgwa; + XGetWindowAttributes (st->dpy, st->window, &xgwa); + XFreePixmap (dpy, st->dbuf); + st->dbuf = XCreatePixmap (st->dpy, st->window, + st->width, st->height, xgwa.depth); + } } static Bool