frame-root-window

frame-root-window is a built-in function in `C source code'.

(frame-root-window &optional FRAME-OR-WINDOW)

Return the root window of FRAME-OR-WINDOW.
If omitted, FRAME-OR-WINDOW defaults to the currently selected frame.
With a frame argument, return that frame's root window.
With a window argument, return the root window of that window's frame.