window-minibuffer-p

window-minibuffer-p is a built-in function in `C source code'.

(window-minibuffer-p &optional WINDOW)

Return non-nil if WINDOW is a minibuffer window.
WINDOW must be a valid window and defaults to the selected one.