Function: frame-first-window

Return the topmost, leftmost live window on FRAME-OR-WINDOW.
If omitted, FRAME-OR-WINDOW defaults to the currently selected frame.
Else if FRAME-OR-WINDOW denotes a valid window, return the first window
of that window's frame. If FRAME-OR-WINDOW denotes a live frame, return
the first window of that frame.

(fn &optional FRAME-OR-WINDOW)