[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?

From: martin rudalics
Subject: Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?
Date: Fri, 12 Jan 2018 19:47:53 +0100

>>> (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'");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]