changed window focusing event to mousedown