Merge "Handle the case where window position comes before view map"