Limit the size of the window