proper scaling of mouse event locations