swap window for buffer