X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Ftruchet.c;h=dda5ac8cf5081bfaf6c7598d52275cd73f009862;hb=4ade52359b6eba3621566dac79793a33aa4c915f;hp=e34ef5caf75de8ce40f73f36428caaa13618a99c;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/truchet.c b/hacks/truchet.c index e34ef5ca..dda5ac8c 100644 --- a/hacks/truchet.c +++ b/hacks/truchet.c @@ -53,7 +53,7 @@ static const char *truchet_defaults [] = { "*erase: True", "*eraseCount: 25", "*square: True", - "*delay: 1000", + "*delay: 400000", "*curves: True", "*angles: True", "*scroll: False", @@ -61,6 +61,9 @@ static const char *truchet_defaults [] = { "*anim-delay: 100", "*anim-step-size: 3", "*randomize: true", +#ifdef USE_IPHONE + "*ignoreRotation: True", +#endif 0 }; @@ -375,6 +378,9 @@ truchet_init (Display *dpy, Window window) st->frame = XCreatePixmap(st->dpy,st->window, st->xgwa.width+st->overlap, st->xgwa.height+st->overlap, st->xgwa.depth); + XFillRectangle(st->dpy, st->frame, st->bgc, 0, 0, + st->xgwa.width + st->overlap, + st->xgwa.height + st->overlap); return st; } @@ -501,14 +507,17 @@ truchet_draw (Display *dpy, Window window, void *closure) XCopyArea(st->dpy,st->frame,st->window,st->agc,0,0,st->xgwa.width,st->xgwa.height,0,0); - /*printf("%d\n",st->delay);*/ - return st->delay*1000; + return st->delay; } static void truchet_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; + XGetWindowAttributes (st->dpy, st->window, &st->xgwa); } static Bool