Fix sync issue about window rotation