diff options
author | Martin Rudalics <rudalics@gmx.at> | 2015-03-03 11:32:19 +0100 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2015-03-03 11:32:19 +0100 |
commit | 1903e25c17a0dce03710143659c0fa9e9c6d6494 (patch) | |
tree | 91d44d9ae771f4720de9e0775bd282637dbb3fbc /src/frame.c | |
parent | 2cc23f170f920cbfc9df4c28bce6ca9d82c4e6cd (diff) | |
download | emacs-1903e25c17a0dce03710143659c0fa9e9c6d6494.tar.gz |
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.
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c index 4a526e228f9..bac2b246ad9 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"); |