unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Feng Shu <tumashu@163.com>
Cc: emacs-devel@gnu.org
Subject: Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?
Date: Fri, 12 Jan 2018 19:47:53 +0100	[thread overview]
Message-ID: <5A5902D9.9070801@gmx.at> (raw)
In-Reply-To: <87fu7b6zsj.fsf@163.com>

 >>> (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	other threads:[~2018-01-12 18:47 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12  3:02 set-frame-parameter a child-frame's 'parent-frame error on macOS ? tumashu
2018-01-12  8:49 ` martin rudalics
2018-01-12 12:13   ` Feng Shu
2018-01-12 18:47     ` martin rudalics [this message]
2018-01-12 19:31       ` Alan Third
2018-01-13  8:49         ` martin rudalics
2018-01-13  3:01       ` tumashu
2018-01-13  8:50         ` martin rudalics
2018-01-13 10:36           ` Feng Shu
2018-01-13 11:58             ` martin rudalics
2018-01-13 12:11               ` Dmitry Gutov
2018-01-13 12:29                 ` martin rudalics
2018-01-14  1:07                   ` Dmitry Gutov
2018-01-14  9:05                     ` martin rudalics
2018-01-14 10:34                       ` Dmitry Gutov
2018-01-14 11:19                         ` martin rudalics
2018-01-13 23:57               ` Feng Shu
2018-01-14  9:05                 ` martin rudalics
2018-01-14 10:35                   ` Dmitry Gutov
2018-01-14 11:19                     ` martin rudalics
2018-01-15  0:29                     ` Dmitry Gutov
2018-01-15  8:49                       ` Robert Pluim
2018-01-15  9:38                       ` martin rudalics
2018-01-15 11:59                         ` Feng Shu
2018-01-16  9:08                           ` martin rudalics
2018-01-16 10:33                             ` Feng Shu
2018-01-19 18:54                               ` martin rudalics
2018-01-20  0:11                                 ` Feng Shu
2018-01-20 10:34                                   ` martin rudalics
2018-01-20 13:26                                     ` Feng Shu
2018-01-15 17:07                         ` Dmitry Gutov
2018-01-16  9:07                           ` martin rudalics
2018-01-16 10:37                             ` Feng Shu
2018-01-16 11:10                           ` Robert Pluim
2018-01-22 11:11                             ` Robert Pluim
2018-01-22 16:01                               ` Eli Zaretskii
2018-01-22 16:12                                 ` Robert Pluim
2018-01-22 16:17                                   ` Eli Zaretskii
2018-01-22 16:25                                     ` Robert Pluim
2018-01-22 16:31                                       ` Eli Zaretskii
2018-01-22 16:55                                         ` Paul Eggert
2018-01-22 16:59                                           ` Eli Zaretskii
2018-01-22 18:59                                             ` martin rudalics
2018-01-23  1:12                                               ` Dmitry Gutov
2018-01-23  3:36                                                 ` Eli Zaretskii
2018-01-24  8:38                                                   ` martin rudalics
2018-01-24  8:47                                                     ` Robert Pluim
2018-01-13 23:59               ` Feng Shu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A5902D9.9070801@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=tumashu@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).