Allow to resize the window (fix #338).