From 18cee9eca2aa558bebc4ee18cb5bc0503a85d9f2 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 24 Dec 2013 17:42:03 +0100 Subject: [PATCH] In balance-windows-area don't call window-height and window-width. Bug#16241. * window.el (balance-windows-area): Call window-size instead of window-height and window-width. Bug#16241. --- lisp/ChangeLog | 5 +++++ lisp/window.el | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 79244ec160c..5402775dfbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-12-24 Martin Rudalics + + * window.el (balance-windows-area): Call window-size instead of + window-height and window-width. Bug#16241. + 2013-12-24 Lars Ingebrigtsen * net/eww.el (eww-bookmark-quit): Remove. diff --git a/lisp/window.el b/lisp/window.el index 3b841747205..b58f8b85815 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4681,12 +4681,12 @@ specific buffers." ;; (assert (eq next (or (cadr (member win wins)) (car wins)))) (let* ((horiz (< (car (window-pixel-edges win)) (car (window-pixel-edges next)))) - (areadiff (/ (- (* (window-height next pixelwise) - (window-width next pixelwise) + (areadiff (/ (- (* (window-size next nil pixelwise) + (window-size next t pixelwise) (buffer-local-value 'window-area-factor (window-buffer next))) - (* (window-height win pixelwise) - (window-width win pixelwise) + (* (window-size win nil pixelwise) + (window-size win t pixelwise) (buffer-local-value 'window-area-factor (window-buffer win)))) (max (buffer-local-value 'window-area-factor @@ -4694,10 +4694,10 @@ specific buffers." (buffer-local-value 'window-area-factor (window-buffer next))))) (edgesize (if horiz - (+ (window-height win pixelwise) - (window-height next pixelwise)) - (+ (window-width win pixelwise) - (window-width next pixelwise)))) + (+ (window-size win nil pixelwise) + (window-size next nil pixelwise)) + (+ (window-size win t pixelwise) + (window-size next t pixelwise)))) (diff (/ areadiff edgesize))) (when (zerop diff) ;; Maybe diff is actually closer to 1 than to 0. -- 2.11.4.GIT