X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=blobdiff_plain;f=pctb%2Fpages.c;h=de967310454085a02ce4ce467b1fa144cf7c2ba4;hp=361ea0ea9926b4cf576d1cdaedfafa5e00370477;hb=834081c7d780ba6d55d8f28328e2e3eb6c1067ab;hpb=0826bbc65e59d47c270f05af419f24fdfc3c349c diff --git a/pctb/pages.c b/pctb/pages.c index 361ea0e..de96731 100644 --- a/pctb/pages.c +++ b/pctb/pages.c @@ -229,7 +229,8 @@ static CanonImage *convert_page(Snapshot *sn) { long xrgb= XGetPixel(sn, x, y); int i; rgb= 0; - for (i=0; i<3; i++, rgb <<= 8) { + for (i=0; i<3; i++) { + rgb <<= 8; unsigned long sample= ((xrgb << shiftmasks[i].lshift) >> shiftmasks[i].rshift) & SAMPLEMASK; @@ -249,7 +250,7 @@ void take_screenshots(void) { /* find the window and check it's on the right kind of screen */ raise_and_get_details(); - snapshot(¤t); + wait_for_stability(¤t,0,0); test= convert_page(current); find_structure(test); free(test); @@ -286,7 +287,7 @@ void take_one_screenshot(void) { raise_and_get_details(); sync_after_input(); - snapshot(¤t); + wait_for_stability(¤t,0,0); page_images[0]= convert_page(current); npages= 1; }