aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2015-03-03 11:32:19 +0100
committerMartin Rudalics2015-03-03 11:32:19 +0100
commit1903e25c17a0dce03710143659c0fa9e9c6d6494 (patch)
tree91d44d9ae771f4720de9e0775bd282637dbb3fbc /src
parent2cc23f170f920cbfc9df4c28bce6ca9d82c4e6cd (diff)
downloademacs-1903e25c17a0dce03710143659c0fa9e9c6d6494.tar.gz
emacs-1903e25c17a0dce03710143659c0fa9e9c6d6494.zip
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')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/frame.c5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 930a33b277a..f1bdd150905 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12015-03-03 Martin Rudalics <rudalics@gmx.at>
2
3 * frame.c (adjust_frame_size): If the pixel sizes remain
4 unchanged but the number of lines or columns of the frame
5 changes, run `window--pixel-to-total' (Bug#19972).
6 (Qwindow_pixel_to_total): DEFSYM it.
7
12015-03-03 Daniel Colascione <dancol@dancol.org> 82015-03-03 Daniel Colascione <dancol@dancol.org>
2 9
3 * print.c (print_object): Print whether a finalizer has 10 * print.c (print_object): Print whether a finalizer has
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,
537 } 537 }
538#endif 538#endif
539 } 539 }
540 else if (new_cols != old_cols)
541 call2 (Qwindow_pixel_to_total, frame, Qt);
540 542
541 if (new_windows_height != old_windows_height 543 if (new_windows_height != old_windows_height
542 /* When the top margin has changed we have to recalculate the top 544 /* 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,
551 if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) 553 if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
552 FrameRows (FRAME_TTY (f)) = new_lines + FRAME_TOP_MARGIN (f); 554 FrameRows (FRAME_TTY (f)) = new_lines + FRAME_TOP_MARGIN (f);
553 } 555 }
556 else if (new_lines != old_lines)
557 call2 (Qwindow_pixel_to_total, frame, Qnil);
554 558
555 frame_size_history_add 559 frame_size_history_add
556 (f, Qadjust_frame_size_3, new_text_width, new_text_height, 560 (f, Qadjust_frame_size_3, new_text_width, new_text_height,
@@ -4831,6 +4835,7 @@ syms_of_frame (void)
4831 DEFSYM (Qframep, "framep"); 4835 DEFSYM (Qframep, "framep");
4832 DEFSYM (Qframe_live_p, "frame-live-p"); 4836 DEFSYM (Qframe_live_p, "frame-live-p");
4833 DEFSYM (Qframe_windows_min_size, "frame-windows-min-size"); 4837 DEFSYM (Qframe_windows_min_size, "frame-windows-min-size");
4838 DEFSYM (Qwindow_pixel_to_total, "window--pixel-to-total");
4834 DEFSYM (Qexplicit_name, "explicit-name"); 4839 DEFSYM (Qexplicit_name, "explicit-name");
4835 DEFSYM (Qheight, "height"); 4840 DEFSYM (Qheight, "height");
4836 DEFSYM (Qicon, "icon"); 4841 DEFSYM (Qicon, "icon");