size(width, height) is basically a shortcut to resize(x(), y(), width, height). It fixes the size of the widget.
If you want the window to be resizable, call
window.resizable(&window);
Have a look at subwindow.cxx in the test programs from the distribution tarball.