Window automatically changes its window when moving