Determine the maximum height and width of a window