Function: frame-ancestor-p
frame-ancestor-p is a function defined in frame.c.
Signature
(frame-ancestor-p ANCESTOR DESCENDANT)
Documentation
Return non-nil if ANCESTOR is an ancestor of DESCENDANT.
ANCESTOR is an ancestor of DESCENDANT when it is either DESCENDANT's parent frame or it is an ancestor of DESCENDANT's parent frame. Both, ANCESTOR and DESCENDANT must be live frames and default to the selected frame.
Source Code
// Defined in /usr/src/emacs/src/frame.c
{
struct frame *af = decode_live_frame (ancestor);
struct frame *df = decode_live_frame (descendant);
return frame_ancestor_p (af, df) ? Qt : Qnil;
}