summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2012-02-04 12:29:29 +0100
committerMartin Rudalics <rudalics@gmx.at>2012-02-04 12:29:29 +0100
commit3b95a6f950fac76439e91f07534f99448be985d6 (patch)
tree4f74d3a9dd535297a3946e75726b8b85657de4c0
parent6283a7d3f4c9c122a5ae93507ca4341b8f33fd36 (diff)
downloademacs-3b95a6f950fac76439e91f07534f99448be985d6.tar.gz
emacs-3b95a6f950fac76439e91f07534f99448be985d6.tar.bz2
emacs-3b95a6f950fac76439e91f07534f99448be985d6.zip
When changing frame sizes round before applying new sizes. (Bug#9723)
* dispnew.c (change_frame_size_1): Calculate new_frame_total_cols after rounding frame sizes. (Bug#9723)
-rw-r--r--src/ChangeLog5
-rw-r--r--src/dispnew.c19
2 files changed, 16 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 40ad7a9f507..95f6201b201 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-04 Martin Rudalics <rudalics@gmx.at>
+
+ * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
+ after rounding frame sizes. (Bug#9723)
+
2012-02-04 Eli Zaretskii <eliz@gnu.org>
* keyboard.c (adjust_point_for_property): Don't position point
diff --git a/src/dispnew.c b/src/dispnew.c
index 9e57bbb28bf..d302e717ec2 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5761,19 +5761,22 @@ change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int
if (newwidth == 0)
newwidth = FRAME_COLS (f);
- /* Compute width of windows in F.
- This is the width of the frame without vertical scroll bars. */
- new_frame_total_cols = FRAME_TOTAL_COLS_ARG (f, newwidth);
-
+ /* Compute width of windows in F. */
/* Round up to the smallest acceptable size. */
check_frame_size (f, &newheight, &newwidth);
+ /* This is the width of the frame with vertical scroll bars and fringe
+ columns. Do this after rounding - see discussion of bug#9723. */
+ new_frame_total_cols = FRAME_TOTAL_COLS_ARG (f, newwidth);
+
/* If we're not changing the frame size, quit now. */
- /* Frame width may be unchanged but the text portion may change, for example,
- fullscreen and remove/add scroll bar. */
+ /* Frame width may be unchanged but the text portion may change, for
+ example, fullscreen and remove/add scroll bar. */
if (newheight == FRAME_LINES (f)
- && newwidth == FRAME_COLS (f) // text portion unchanged
- && new_frame_total_cols == FRAME_TOTAL_COLS (f)) // frame width unchanged
+ /* Text portion unchanged? */
+ && newwidth == FRAME_COLS (f)
+ /* Frame width unchanged? */
+ && new_frame_total_cols == FRAME_TOTAL_COLS (f))
return;
BLOCK_INPUT;