Correctly maintain the window size.