Set an initial size to the window if it is empty

Change-Id: Ib3e8a4b69ef855be45ad1ad987975697d262c739
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>