Improve AOE2 window-active check