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.

View in manual

Source Code

// Defined in /usr/src/emacs/src/frame.c
{
#ifdef HAVE_WINDOW_SYSTEM
  struct frame *af = decode_live_frame (ancestor);
  struct frame *df = decode_live_frame (descendant);

  return frame_ancestor_p (af, df) ? Qt : Qnil;
#else
  return Qnil;
#endif
  }