diff options
Diffstat (limited to 'lisp/window.el')
-rw-r--r-- | lisp/window.el | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lisp/window.el b/lisp/window.el index f20940fa0ea..bb34a6d7b4c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2642,12 +2642,17 @@ and no others." "Return t if WINDOW is the currently active minibuffer window." (and (window-live-p window) (eq window (active-minibuffer-window)))) -(defun count-windows (&optional minibuf) +(defun count-windows (&optional minibuf all-frames) "Return the number of live windows on the selected frame. + The optional argument MINIBUF specifies whether the minibuffer -window shall be counted. See `walk-windows' for the precise -meaning of this argument." - (length (window-list-1 nil minibuf))) +window is included in the count. + +If ALL-FRAMES is non-nil, count the windows in all frames instead +just the selected frame. + +See `walk-windows' for the precise meaning of this argument." + (length (window-list-1 nil minibuf all-frames))) ;;; Resizing windows. (defun window--size-to-pixel (window size &optional horizontal pixelwise round-maybe) @@ -5729,10 +5734,10 @@ window." WINDOW defaults to the selected window. DIRECTION can be nil (i.e. any), `height' or `width'." (with-current-buffer (window-buffer window) - (when (and (boundp 'window-size-fixed) window-size-fixed) - (not (and direction - (member (cons direction window-size-fixed) - '((height . width) (width . height)))))))) + (and window-size-fixed + (not (and direction + (member (cons direction window-size-fixed) + '((height . width) (width . height)))))))) ;;; A different solution to balance-windows. (defvar window-area-factor 1 |