considering that the height of the window changes