dynamically determine window dimensions from object fields