Seem to fix the problem, thanks, https://github.com/tumashu/company-childframe/issues/3#issuecomment-357404832
At 2018-01-13 02:47:53, "martin rudalics" <rudalics@gmx.at> wrote:
> >>> (let ((test (let ((after-make-frame-functions nil))
> >>> (make-frame
> >>> `((parent-frame . ,(window-frame))
> >>> (width . 10)
> >>> (height . 10))))))
> >>> (set-frame-parameter test 'parent-frame (window-frame)))
> >>> ----------
> >>
> >> I'm not sure what this code is supposed to do. First you make a new
> >> child frame named 'test' with the selected frame as its parent. Then
> >> you want to set the parent frame of 'test' to the selected frame.
> >>
> >
> > The above just a example to show bug.
>
>OK. But setting the parent frame two times for the same frame makes
>it difficult to say which instance causes the bug. Anyway, can you
>try the trivial patch to nsterm.m below?
>
>Thanks, martin
>
>
>diff --git a/src/nsterm.m b/src/nsterm.m
>index 5798f4f..1a6066f 100644
>--- a/src/nsterm.m
>+++ b/src/nsterm.m
>@@ -1932,7 +1932,7 @@ so some key presses (TAB) are swallowed by the system. */
> if (!NILP (new_value)
> && (!FRAMEP (new_value)
> || !FRAME_LIVE_P (p = XFRAME (new_value))
>- || !FRAME_X_P (p)))
>+ || !FRAME_NS_P (p)))
> {
> store_frame_param (f, Qparent_frame, old_value);
> error ("Invalid specification of `parent-frame'");
>