In pgtk, child-frame-border-width is set to 0 by default, and it cannot be set to nil. According to the manual it should be possible for child-frame-border- width to be nil. In such cases, the value of internal-border-width is used as the border width (see 30.4.3.4 "Layout Parameters"; and function FRAME_INTERNAL_BORDER_WIDTH in frame.h). The problem causes missing child-frame borders for code that depends on this behavior (e.g., lsp-doc-ui in the lsp-ui package), and it will cause errors for code that tries to set child-frame-border-width to nil. The attached patch fixes this. It essentially replicates the respective behavior of xfns.c.