Move the window position history logic out of the window position manager.