Function: window-at-side-p

window-at-side-p is a byte-compiled function defined in window.el.gz.

Signature

(window-at-side-p &optional WINDOW SIDE)

Documentation

Return t if WINDOW is at SIDE of its containing frame.

WINDOW must be a valid window and defaults to the selected one. SIDE can be any of the symbols left, top, right or bottom. The default value nil is handled like bottom.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window-at-side-p (&optional window side)
  "Return t if WINDOW is at SIDE of its containing frame.
WINDOW must be a valid window and defaults to the selected one.
SIDE can be any of the symbols `left', `top', `right' or
`bottom'.  The default value nil is handled like `bottom'."
  (setq window (window-normalize-window window))
  (let ((edge
	 (cond
	  ((eq side 'left) 0)
	  ((eq side 'top) 1)
	  ((eq side 'right) 2)
	  ((memq side '(bottom nil)) 3))))
    (= (nth edge (window-pixel-edges window))
       (nth edge (window-pixel-edges (frame-root-window window))))))