Compute output window visible bounds in a more reliable way.