Account for the rotation of the window.