Minor cleans and improvements

- don't check for input if window is not activated
- fix a braino in UnitCanMove logic