Commit 1903e25c authored by Martin Rudalics's avatar Martin Rudalics

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.
parent 2cc23f17
2015-03-03 Martin Rudalics <rudalics@gmx.at>
* window.el (window--dump-frame): For pixel height return total
number of frame's lines.
2015-03-03 Daniel Colascione <dancol@dancol.org>
* emacs-lisp/cl-macs.el (cl-iter-defun): Add cl-iter-defun.
......
......@@ -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)
......
2015-03-03 Martin Rudalics <rudalics@gmx.at>
* 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 <dancol@dancol.org>
* print.c (print_object): Print whether a finalizer has
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment