Okay, this is what I've calculated based on this population projection. NOTE, it is NOT 2040, but 2050. I looked for state projections to 2040, but could not find any. The Census Bureau projects the US population in 2050 will be about 439 million. I used the closest number in this report
http://www.fairus.org/site/DocServer/pop_projections.pdf?docID=901, which projects 444 million people with a low-trend immigration curve. As you can see there are large population growth in the South West due to immigration.
Keep in mind, this electoral map has assumes a House size of 437, not 435.
I'll say Texas and Virginia are swing states, while the Great Lakes area more Republican (with the exception of Ohio).
Slightly larger map:
http://i12.photobucket.com/albums/a214/MasterRegal/2050ElectoralMap.png