Switch windows by history.