Merge "Improve window orientation listener."