get-mru-window
get-mru-window is a compiled Lisp function in `window.el
'.
(get-mru-window &optional ALL-FRAMES DEDICATED NOT-SELECTED)
Return the most recently used window on frames specified by ALL-FRAMES.
A minibuffer window is never a candidate. A dedicated window is
never a candidate unless DEDICATED is non-nil, so if all windows
are dedicated, the value is nil. Optional argument NOT-SELECTED
non-nil means never return the selected window.
The following non-nil values of the optional argument ALL-FRAMES
have special meanings:
- t means consider all windows on all existing frames.
- `visible' means consider all windows on all visible frames on
the current terminal.
- 0 (the number zero) means consider all windows on all visible
and iconified frames on the current terminal.
- A frame means consider all windows on that frame only.
Any other value of ALL-FRAMES means consider all windows on the
selected frame and no others.