window--major-non-side-window

window--major-non-side-window is a compiled Lisp function in `window.el'.

(window--major-non-side-window &optional FRAME)

Return the major non-side window of frame FRAME.
The optional argument FRAME must be a live frame and defaults to
the selected one.

If FRAME has at least one side window, the major non-side window
is either an internal non-side window such that all other
non-side windows on FRAME descend from it, or the single live
non-side window of FRAME. If FRAME has no side windows, return
its root window.