window--in-subtree-p

window--in-subtree-p is a compiled Lisp function in `window.el'.

(window--in-subtree-p WINDOW ROOT)

Return t if WINDOW is either ROOT or a member of ROOT's subtree.