Save window position and maximized state.