From: Ian Jackson Date: Wed, 21 Oct 2009 22:48:36 +0000 (+0100) Subject: Merge branch 'stable-3.x' X-Git-Tag: 5.0^2~5 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=commitdiff_plain;h=3ce667a2d3fd7c36f60da86bb59071264790e375;hp=c9225ff45ee5e69855cb24cfb648d903dbba54a7;p=ypp-sc-tools.db-test.git Merge branch 'stable-3.x' Conflicts: yarrg/TODO --- diff --git a/yarrg/TODO b/yarrg/TODO index 8e85c93..101af03 100644 --- a/yarrg/TODO +++ b/yarrg/TODO @@ -22,6 +22,10 @@ support Opal and Jade (currently there are some unicode problems) WEBSITE ------- +trades for route with an archipelago should produce + a message saying `searched for arbitrage trades only in + Ruby' or some such. + allow unticking based on minimum margin or minimum profit initial/final stocks feature diff --git a/yarrg/pages.c b/yarrg/pages.c index 02cacd9..28364a0 100644 --- a/yarrg/pages.c +++ b/yarrg/pages.c @@ -154,6 +154,28 @@ static void check_not_disturbed(void) { } } +static void check_pointer_not_disturbed(void) { + Window got_root, got_child; + int got_root_x, got_root_y; + int got_win_x, got_win_y; + unsigned got_mask; + + int r= XQueryPointer(disp,id, &got_root,&got_child, + &got_root_x, &got_root_y, + &got_win_x, &got_win_y, + &got_mask); + if (!r || + got_win_x!=commod_page_point.x || + got_win_y!=commod_page_point.y) { + progress(""); + fprintf(stderr,"\nunexpected mouse position:" + " samescreen=%d got=%dx%d want=%dx%d", + r, got_win_x,got_win_y, + commod_page_point.x,commod_page_point.y); + fatal("Mouse pointer moved."); + } +} + static void send_key(KeySym sym) { check_not_disturbed(); XTestFakeKeyEvent(disp, keycode(sym),1, 0); @@ -174,6 +196,7 @@ static void send_mouse_1_updown(int x, int y) { } static void pgdown_by_mouse(void) { check_not_disturbed(); + check_pointer_not_disturbed(); debugf("PAGING Mouse\n"); send_mouse_1_updown_here(); sync_after_input(); @@ -350,7 +373,7 @@ static void wait_for_stability(Snapshot **output, " last_input=%f previously=%p `%s'\n", last_input, previously, doing); - double max_interval= 5.000; + double max_interval= 1.000; double min_interval= 0.100; for (;;) { progress_spinner("%s",doing);