Use the window width+height instead of the buffer.