This describes in more detail how the window size is saved and restored when starting/exiting SyncTERM.