Replace duplicated code by improved fire_mouse_event