Recompute frameSize before calling startFrame in case frame.width or frame.height is modified