[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1903e25: Fix calculation of total window sizes afte
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] master 1903e25: Fix calculation of total window sizes after font size changes (Bug#19972). |
Date: |
Tue, 03 Mar 2015 10:33:40 +0000 |
branch: master
commit 1903e25c17a0dce03710143659c0fa9e9c6d6494
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>
Fix calculation of total window sizes after font size changes (Bug#19972).
* frame.c (adjust_frame_size): If the pixel sizes remain
unchanged but the number of lines or columns of the frame
changes, run `window--pixel-to-total' (Bug#19972).
(Qwindow_pixel_to_total): DEFSYM it.
* window.el (window--dump-frame): For pixel height return total
number of frame's lines.
---
lisp/ChangeLog | 5 +++++
lisp/window.el | 2 +-
src/ChangeLog | 7 +++++++
src/frame.c | 5 +++++
4 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index aae09fd..16206e2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-03 Martin Rudalics <address@hidden>
+
+ * window.el (window--dump-frame): For pixel height return total
+ number of frame's lines.
+
2015-03-03 Daniel Colascione <address@hidden>
* emacs-lisp/cl-macs.el (cl-iter-defun): Add cl-iter-defun.
diff --git a/lisp/window.el b/lisp/window.el
index abc6006..cc8a7fc 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1160,7 +1160,7 @@ dumping to it."
(insert
(format "frame pixel: %s x %s cols/lines: %s x %s units: %s x %s\n"
(frame-pixel-width frame) (frame-pixel-height frame)
- (frame-total-cols frame) (frame-text-lines frame) ;
(frame-total-lines frame)
+ (frame-total-cols frame) (frame-total-lines frame)
(frame-char-width frame) (frame-char-height frame))
(format "frame text pixel: %s x %s cols/lines: %s x %s\n"
(frame-text-width frame) (frame-text-height frame)
diff --git a/src/ChangeLog b/src/ChangeLog
index 930a33b..f1bdd15 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-03 Martin Rudalics <address@hidden>
+
+ * frame.c (adjust_frame_size): If the pixel sizes remain
+ unchanged but the number of lines or columns of the frame
+ changes, run `window--pixel-to-total' (Bug#19972).
+ (Qwindow_pixel_to_total): DEFSYM it.
+
2015-03-03 Daniel Colascione <address@hidden>
* print.c (print_object): Print whether a finalizer has
diff --git a/src/frame.c b/src/frame.c
index 4a526e2..bac2b24 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -537,6 +537,8 @@ adjust_frame_size (struct frame *f, int new_width, int
new_height, int inhibit,
}
#endif
}
+ else if (new_cols != old_cols)
+ call2 (Qwindow_pixel_to_total, frame, Qt);
if (new_windows_height != old_windows_height
/* When the top margin has changed we have to recalculate the top
@@ -551,6 +553,8 @@ adjust_frame_size (struct frame *f, int new_width, int
new_height, int inhibit,
if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
FrameRows (FRAME_TTY (f)) = new_lines + FRAME_TOP_MARGIN (f);
}
+ else if (new_lines != old_lines)
+ call2 (Qwindow_pixel_to_total, frame, Qnil);
frame_size_history_add
(f, Qadjust_frame_size_3, new_text_width, new_text_height,
@@ -4831,6 +4835,7 @@ syms_of_frame (void)
DEFSYM (Qframep, "framep");
DEFSYM (Qframe_live_p, "frame-live-p");
DEFSYM (Qframe_windows_min_size, "frame-windows-min-size");
+ DEFSYM (Qwindow_pixel_to_total, "window--pixel-to-total");
DEFSYM (Qexplicit_name, "explicit-name");
DEFSYM (Qheight, "height");
DEFSYM (Qicon, "icon");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 1903e25: Fix calculation of total window sizes after font size changes (Bug#19972).,
Martin Rudalics <=