Move window position calculations out of the window position manager.