X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=pctb%2Fpages.c;h=ecec334e88d24ba51fbc1a29c5041441871a98e6;hb=ca2598d063219f019ba8e04a4762552f556795ca;hp=010299948d929d3f1ce247d683de11b900bb6697;hpb=5f9478a284c640fde807ee4a1e18cae8438dca52;p=ypp-sc-tools.main.git diff --git a/pctb/pages.c b/pctb/pages.c index 0102999..ecec334 100644 --- a/pctb/pages.c +++ b/pctb/pages.c @@ -52,6 +52,7 @@ static Display *disp; static struct timeval tv_startup; static unsigned wwidth, wheight; static int max_relevant_y= -1; +static Point commod_focus_point; static XImage *shmim; static XShmSegmentInfo shminfo; @@ -497,7 +498,7 @@ static void set_focus_commodity(void) { debugf("PAGING set_focus\n"); - mouse_1_updown(160,160); + mouse_1_updown(commod_focus_point.x, commod_focus_point.y); sync_after_input(); delay(0.5); @@ -543,7 +544,7 @@ static void prepare_ypp_client(void) { wait_for_stability(¤t,0,0, "checking current YPP client screen..."); test= convert_page(current); - find_structure(test, &max_relevant_y); + find_structure(test, &max_relevant_y, &commod_focus_point); check_correct_commodities(); Rect sunshine= find_sunshine_widget();