[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[STUMP] [PATCH] FRAME-DISPLAY-Y: properly handle vertically aligned head
From: |
Magnus Henoch |
Subject: |
[STUMP] [PATCH] FRAME-DISPLAY-Y: properly handle vertically aligned heads |
Date: |
Sat, 09 Feb 2008 13:13:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) |
I found that toggling the mode-line for a head that is configured to be
below another head makes the frame of that head appear halfway on the
head above. This patch seems to fix the problem.
---
mode-line.lisp | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/mode-line.lisp b/mode-line.lisp
index 698ce2f..3ed7946 100644
--- a/mode-line.lisp
+++ b/mode-line.lisp
@@ -256,13 +256,17 @@ timer.")
(defun frame-display-y (group frame)
"Return a Y for frame that doesn't overlap the mode-line."
(let* ((head (frame-head group frame))
- (ml (head-mode-line head)))
+ (ml (head-mode-line head))
+ (head-y (frame-y head))
+ (rel-frame-y (- (frame-y frame) head-y)))
(if (and ml (not (eq (mode-line-mode ml) :hidden)))
(case (mode-line-position ml)
(:top
- (+ (mode-line-height ml) (round (* (frame-y frame)
(mode-line-factor ml)))))
+ (+ head-y
+ (+ (mode-line-height ml) (round (* rel-frame-y (mode-line-factor
ml))))))
(:bottom
- (round (* (frame-y frame) (mode-line-factor ml)))))
+ (+ head-y
+ (round (* rel-frame-y (mode-line-factor ml))))))
(frame-y frame))))
(defun frame-display-height (group frame)
--
1.5.3.7
- [STUMP] [PATCH] FRAME-DISPLAY-Y: properly handle vertically aligned heads,
Magnus Henoch <=