code cleanup: move coord conversion from individual mouse events to function mf_scale_mouse_event