Function: walk-window-tree

Run function FUN on each live window of FRAME.
FUN must be a function with one argument - a window. FRAME must
be a live frame and defaults to the selected one. ANY, if
non-nil, means to run FUN on all live and internal windows of
FRAME.

Optional argument MINIBUF t means run FUN on FRAME's minibuffer
window even if it isn't active. MINIBUF nil or omitted means run
FUN on FRAME's minibuffer window only if it's active. In both
cases the minibuffer window must be part of FRAME. MINIBUF
neither nil nor t means never run FUN on the minibuffer window.

This function performs a pre-order, depth-first traversal of the
window tree. If FUN changes the window tree, the result is unpredictable.