Some functions for expanding and shrinking windows.