fix window size for windows without content

Adjust window size even if no content is set for the window (fixes #336).
hhm, maybe...