$w->xviewScroll($xpos < $x ? 1 : -1, q{units}); ... $w->yviewScroll($ypos < $y ? 1 : -1, q{units});