Function: frame-parent
frame-parent is a function defined in frame.c.
Signature
(frame-parent &optional FRAME)
Documentation
Return the parent frame of FRAME.
The parent frame of FRAME is the Emacs frame whose window-system window is the parent window of FRAME's window-system window. When such a frame exists, FRAME is considered a child frame of that frame.
Return nil if FRAME has no parent frame. This means that FRAME's
window-system window is either a "top-level" window (a window whose
parent window is the window-system's root window) or an embedded window
(a window whose parent window is owned by some other application).
Source Code
// Defined in /usr/src/emacs/src/frame.c
{
struct frame *f = decode_live_frame (frame);
struct frame *p = FRAME_PARENT_FRAME (f);
Lisp_Object parent;
/* Can't return f->parent_frame directly since it might not be defined
for this platform. */
if (p)
{
XSETFRAME (parent, p);
return parent;
}
else
return Qnil;
}