It's being called for every mouse event. It's needed to activate the OS mouse cursor while in windowed mode and XBMC mouse is disabled. It's there to keep the old functionality same.

The current code calls SetActivate multiple times straight after every mouse event. The whole point of this PR is to remove every unnecessary SetActivate.