chiark / gitweb /
Trying Hunter but it failed
[ypp-sc-tools.db-live.git] / yarrg / pages.c
index 8f1332c..02cacd9 100644 (file)
@@ -605,28 +605,24 @@ void take_screenshots(void) {
   for (;;) {
     debugf("page %d paging\n",npages);
 
+    pgdown_by_mouse();
+
     if (!(npages < MAX_PAGES))
       fatal("Paging down seems to generate too many pages - max is %d.",
            MAX_PAGES);
 
     convert_store_page(current);
     free_snapshot(&last); last=current; current=0;
-
     debugf("PAGING page %d converted\n",npages);
+    npages++;
 
     wait_for_stability(&current,last, 0,
                       "page %d collecting    ...",
-                      npages+1);
-
-    if (npages &&  /* first pagedown doesn't do much */
-       identical(current,last)) {
-      npages++;
+                      npages);
+    if (identical(current,last)) {
       free_snapshot(&current);
       break;
     }
-
-    pgdown_by_mouse();
-    npages++;
   }
   progress("finishing with the YPP client...");
   send_mouse_1_updown(commod_focuslast_point.x, commod_focuslast_point.y);
@@ -636,6 +632,7 @@ void take_screenshots(void) {
 
   debugf("PAGING all done.\n");
   progress_log("collected %d screenshots.",npages);
+  check_pager_motion(0,npages);
 }    
 
 void take_one_screenshot(void) {