Fix performance drop caused by setting mouse cursor every frame.