aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Antipov2013-03-20 15:29:37 +0400
committerDmitry Antipov2013-03-20 15:29:37 +0400
commit5f24fa51a07664e81d4c710fe310d2c2fbea8bb5 (patch)
tree4d5681a0ae85865f263f6a29ea41dcf3e4ed41e8
parent96061a21804d6f7ac3b1371470a288344f5f62cd (diff)
downloademacs-5f24fa51a07664e81d4c710fe310d2c2fbea8bb5.tar.gz
emacs-5f24fa51a07664e81d4c710fe310d2c2fbea8bb5.zip
* window.h (struct window): Convert left_col, top_line, total_lines
and total_cols from Lisp_Objects to integers. Adjust comments. (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines): Remove. (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL) (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion. * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c: Adjust users where appropriate.
-rw-r--r--src/ChangeLog11
-rw-r--r--src/dispnew.c22
-rw-r--r--src/frame.c14
-rw-r--r--src/w32fns.c14
-rw-r--r--src/window.c159
-rw-r--r--src/window.h57
-rw-r--r--src/xdisp.c16
-rw-r--r--src/xfns.c16
8 files changed, 144 insertions, 165 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 03127c62539..d71b9335319 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,16 @@
12013-03-20 Dmitry Antipov <dmantipov@yandex.ru> 12013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 * window.h (struct window): Convert left_col, top_line, total_lines
4 and total_cols from Lisp_Objects to integers. Adjust comments.
5 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
6 Remove.
7 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
8 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
9 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
10 Adjust users where appropriate.
11
122013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
13
3 * frame.h (struct frame): Drop resx and resy because the same data is 14 * frame.h (struct frame): Drop resx and resy because the same data is
4 available from window system-specific output context. Adjust users. 15 available from window system-specific output context. Adjust users.
5 (default_pixels_per_inch_x, default_pixels_per_inch_y): New 16 (default_pixels_per_inch_x, default_pixels_per_inch_y): New
diff --git a/src/dispnew.c b/src/dispnew.c
index f23562cb97a..bc65050605a 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -363,7 +363,7 @@ margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin
363 363
364 if (NUMBERP (margin)) 364 if (NUMBERP (margin))
365 { 365 {
366 int width = XFASTINT (w->total_cols); 366 int width = w->total_cols;
367 double d = max (0, XFLOATINT (margin)); 367 double d = max (0, XFLOATINT (margin));
368 d = min (width / 2 - 1, d); 368 d = min (width / 2 - 1, d);
369 n = (int) ((double) total_glyphs / width * d); 369 n = (int) ((double) total_glyphs / width * d);
@@ -1776,7 +1776,7 @@ required_matrix_width (struct window *w)
1776 } 1776 }
1777#endif /* HAVE_WINDOW_SYSTEM */ 1777#endif /* HAVE_WINDOW_SYSTEM */
1778 1778
1779 return XINT (w->total_cols); 1779 return w->total_cols;
1780} 1780}
1781 1781
1782 1782
@@ -2114,10 +2114,10 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2114 2114
2115 /* Set window dimensions to frame dimensions and allocate or 2115 /* Set window dimensions to frame dimensions and allocate or
2116 adjust glyph matrices of W. */ 2116 adjust glyph matrices of W. */
2117 wset_top_line (w, make_number (0)); 2117 w->top_line = 0;
2118 wset_left_col (w, make_number (0)); 2118 w->left_col = 0;
2119 wset_total_lines (w, make_number (FRAME_MENU_BAR_LINES (f))); 2119 w->total_lines = FRAME_MENU_BAR_LINES (f);
2120 wset_total_cols (w, make_number (FRAME_TOTAL_COLS (f))); 2120 w->total_cols = FRAME_TOTAL_COLS (f);
2121 allocate_matrices_for_window_redisplay (w); 2121 allocate_matrices_for_window_redisplay (w);
2122 } 2122 }
2123#endif /* not USE_X_TOOLKIT && not USE_GTK */ 2123#endif /* not USE_X_TOOLKIT && not USE_GTK */
@@ -2140,10 +2140,10 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2140 else 2140 else
2141 w = XWINDOW (f->tool_bar_window); 2141 w = XWINDOW (f->tool_bar_window);
2142 2142
2143 wset_top_line (w, make_number (FRAME_MENU_BAR_LINES (f))); 2143 w->top_line = FRAME_MENU_BAR_LINES (f);
2144 wset_left_col (w, make_number (0)); 2144 w->left_col = 0;
2145 wset_total_lines (w, make_number (FRAME_TOOL_BAR_LINES (f))); 2145 w->total_lines = FRAME_TOOL_BAR_LINES (f);
2146 wset_total_cols (w, make_number (FRAME_TOTAL_COLS (f))); 2146 w->total_cols = FRAME_TOTAL_COLS (f);
2147 allocate_matrices_for_window_redisplay (w); 2147 allocate_matrices_for_window_redisplay (w);
2148 } 2148 }
2149#endif 2149#endif
@@ -5583,7 +5583,7 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth,
5583 FrameCols (FRAME_TTY (f)) = newwidth; 5583 FrameCols (FRAME_TTY (f)) = newwidth;
5584 5584
5585 if (WINDOWP (f->tool_bar_window)) 5585 if (WINDOWP (f->tool_bar_window))
5586 wset_total_cols (XWINDOW (f->tool_bar_window), make_number (newwidth)); 5586 XWINDOW (f->tool_bar_window)->total_cols = newwidth;
5587 } 5587 }
5588 5588
5589 FRAME_LINES (f) = newheight; 5589 FRAME_LINES (f) = newheight;
diff --git a/src/frame.c b/src/frame.c
index 0fa821682f3..2ed2c5a2771 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -155,8 +155,8 @@ set_menu_bar_lines_1 (Lisp_Object window, int n)
155 struct window *w = XWINDOW (window); 155 struct window *w = XWINDOW (window);
156 156
157 w->last_modified = 0; 157 w->last_modified = 0;
158 wset_top_line (w, make_number (XFASTINT (w->top_line) + n)); 158 w->top_line += n;
159 wset_total_lines (w, make_number (XFASTINT (w->total_lines) - n)); 159 w->total_lines -= n;
160 160
161 /* Handle just the top child in a vertical split. */ 161 /* Handle just the top child in a vertical split. */
162 if (!NILP (w->vchild)) 162 if (!NILP (w->vchild))
@@ -332,14 +332,14 @@ make_frame (int mini_p)
332 SET_FRAME_COLS (f, 10); 332 SET_FRAME_COLS (f, 10);
333 FRAME_LINES (f) = 10; 333 FRAME_LINES (f) = 10;
334 334
335 wset_total_cols (XWINDOW (root_window), make_number (10)); 335 XWINDOW (root_window)->total_cols = 10;
336 wset_total_lines (XWINDOW (root_window), make_number (mini_p ? 9 : 10)); 336 XWINDOW (root_window)->total_lines = mini_p ? 9 : 10;
337 337
338 if (mini_p) 338 if (mini_p)
339 { 339 {
340 wset_total_cols (XWINDOW (mini_window), make_number (10)); 340 XWINDOW (mini_window)->total_cols = 10;
341 wset_top_line (XWINDOW (mini_window), make_number (9)); 341 XWINDOW (mini_window)->top_line = 9;
342 wset_total_lines (XWINDOW (mini_window), make_number (1)); 342 XWINDOW (mini_window)->total_lines = 1;
343 } 343 }
344 344
345 /* Choose a buffer for the frame's root window. */ 345 /* Choose a buffer for the frame's root window. */
diff --git a/src/w32fns.c b/src/w32fns.c
index 83b52d73596..4c47465e67b 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5774,8 +5774,8 @@ Text larger than the specified size is clipped. */)
5774 5774
5775 /* Set up the frame's root window. */ 5775 /* Set up the frame's root window. */
5776 w = XWINDOW (FRAME_ROOT_WINDOW (f)); 5776 w = XWINDOW (FRAME_ROOT_WINDOW (f));
5777 wset_left_col (w, make_number (0)); 5777 w->left_col = 0;
5778 wset_top_line (w, make_number (0)); 5778 w->top_line = 0;
5779 5779
5780 if (CONSP (Vx_max_tooltip_size) 5780 if (CONSP (Vx_max_tooltip_size)
5781 && INTEGERP (XCAR (Vx_max_tooltip_size)) 5781 && INTEGERP (XCAR (Vx_max_tooltip_size))
@@ -5783,13 +5783,13 @@ Text larger than the specified size is clipped. */)
5783 && INTEGERP (XCDR (Vx_max_tooltip_size)) 5783 && INTEGERP (XCDR (Vx_max_tooltip_size))
5784 && XINT (XCDR (Vx_max_tooltip_size)) > 0) 5784 && XINT (XCDR (Vx_max_tooltip_size)) > 0)
5785 { 5785 {
5786 wset_total_cols (w, XCAR (Vx_max_tooltip_size)); 5786 w->total_cols = XFASTINT (XCAR (Vx_max_tooltip_size));
5787 wset_total_lines (w, XCDR (Vx_max_tooltip_size)); 5787 w->total_lines = XFASTINT (XCDR (Vx_max_tooltip_size));
5788 } 5788 }
5789 else 5789 else
5790 { 5790 {
5791 wset_total_cols (w, make_number (80)); 5791 w->total_cols = 80;
5792 wset_total_lines (w, make_number (40)); 5792 w->total_lines = 40;
5793 } 5793 }
5794 5794
5795 FRAME_TOTAL_COLS (f) = XINT (w->total_cols); 5795 FRAME_TOTAL_COLS (f) = XINT (w->total_cols);
@@ -5860,7 +5860,7 @@ Text larger than the specified size is clipped. */)
5860 /* w->total_cols and FRAME_TOTAL_COLS want the width in columns, 5860 /* w->total_cols and FRAME_TOTAL_COLS want the width in columns,
5861 not in pixels. */ 5861 not in pixels. */
5862 width /= WINDOW_FRAME_COLUMN_WIDTH (w); 5862 width /= WINDOW_FRAME_COLUMN_WIDTH (w);
5863 wset_total_cols (w, make_number (width)); 5863 w->total_cols = width;
5864 FRAME_TOTAL_COLS (f) = width; 5864 FRAME_TOTAL_COLS (f) = width;
5865 adjust_glyphs (f); 5865 adjust_glyphs (f);
5866 w->pseudo_window_p = 1; 5866 w->pseudo_window_p = 1;
diff --git a/src/window.c b/src/window.c
index 5dc908f0a4d..875d7770277 100644
--- a/src/window.c
+++ b/src/window.c
@@ -692,7 +692,7 @@ On a graphical display, this total height is reported as an
692integer multiple of the default character height. */) 692integer multiple of the default character height. */)
693 (Lisp_Object window) 693 (Lisp_Object window)
694{ 694{
695 return decode_valid_window (window)->total_lines; 695 return make_number (decode_valid_window (window)->total_lines);
696} 696}
697 697
698DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0, 698DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0,
@@ -707,7 +707,7 @@ On a graphical display, this total width is reported as an
707integer multiple of the default character width. */) 707integer multiple of the default character width. */)
708 (Lisp_Object window) 708 (Lisp_Object window)
709{ 709{
710 return decode_valid_window (window)->total_cols; 710 return make_number (decode_valid_window (window)->total_cols);
711} 711}
712 712
713DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, 713DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0,
@@ -746,7 +746,7 @@ value is 0 if there is no window to the left of WINDOW.
746WINDOW must be a valid window and defaults to the selected one. */) 746WINDOW must be a valid window and defaults to the selected one. */)
747 (Lisp_Object window) 747 (Lisp_Object window)
748{ 748{
749 return decode_valid_window (window)->left_col; 749 return make_number (decode_valid_window (window)->left_col);
750} 750}
751 751
752DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, 752DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0,
@@ -758,7 +758,7 @@ there is no window above WINDOW.
758WINDOW must be a valid window and defaults to the selected one. */) 758WINDOW must be a valid window and defaults to the selected one. */)
759 (Lisp_Object window) 759 (Lisp_Object window)
760{ 760{
761 return decode_valid_window (window)->top_line; 761 return make_number (decode_valid_window (window)->top_line);
762} 762}
763 763
764/* Return the number of lines of W's body. Don't count any mode or 764/* Return the number of lines of W's body. Don't count any mode or
@@ -767,7 +767,7 @@ WINDOW must be a valid window and defaults to the selected one. */)
767static int 767static int
768window_body_lines (struct window *w) 768window_body_lines (struct window *w)
769{ 769{
770 int height = XFASTINT (w->total_lines); 770 int height = w->total_lines;
771 771
772 if (!MINI_WINDOW_P (w)) 772 if (!MINI_WINDOW_P (w))
773 { 773 {
@@ -789,7 +789,7 @@ int
789window_body_cols (struct window *w) 789window_body_cols (struct window *w)
790{ 790{
791 struct frame *f = XFRAME (WINDOW_FRAME (w)); 791 struct frame *f = XFRAME (WINDOW_FRAME (w));
792 int width = XINT (w->total_cols); 792 int width = w->total_cols;
793 793
794 if (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) 794 if (WINDOW_HAS_VERTICAL_SCROLL_BAR (w))
795 /* Scroll bars occupy a few columns. */ 795 /* Scroll bars occupy a few columns. */
@@ -2007,12 +2007,12 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag)
2007 if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (o->frame)))) 2007 if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (o->frame))))
2008 fset_root_window (XFRAME (o->frame), new); 2008 fset_root_window (XFRAME (o->frame), new);
2009 2009
2010 if (setflag) 2010 if (setflag)
2011 { 2011 {
2012 wset_left_col (n, o->left_col); 2012 n->left_col = o->left_col;
2013 wset_top_line (n, o->top_line); 2013 n->top_line = o->top_line;
2014 wset_total_cols (n, o->total_cols); 2014 n->total_cols = o->total_cols;
2015 wset_total_lines (n, o->total_lines); 2015 n->total_lines = o->total_lines;
2016 wset_normal_cols (n, o->normal_cols); 2016 wset_normal_cols (n, o->normal_cols);
2017 wset_normal_cols (o, make_float (1.0)); 2017 wset_normal_cols (o, make_float (1.0));
2018 wset_normal_lines (n, o->normal_lines); 2018 wset_normal_lines (n, o->normal_lines);
@@ -2097,12 +2097,12 @@ recombine_windows (Lisp_Object window)
2097 2097
2098 if (horflag) 2098 if (horflag)
2099 wset_normal_cols (c, 2099 wset_normal_cols (c,
2100 make_float (XFLOATINT (c->total_cols) 2100 make_float ((double) c->total_cols
2101 / XFLOATINT (p->total_cols))); 2101 / (double) p->total_cols));
2102 else 2102 else
2103 wset_normal_lines (c, 2103 wset_normal_lines (c,
2104 make_float (XFLOATINT (c->total_lines) 2104 make_float ((double) c->total_lines
2105 / XFLOATINT (p->total_lines))); 2105 / (double) p->total_lines));
2106 2106
2107 if (NILP (c->next)) 2107 if (NILP (c->next))
2108 { 2108 {
@@ -2861,9 +2861,8 @@ window-start value is reasonable when this function is called. */)
2861 if (NILP (w->buffer)) 2861 if (NILP (w->buffer))
2862 { 2862 {
2863 /* Resize child windows vertically. */ 2863 /* Resize child windows vertically. */
2864 XSETINT (delta, XINT (r->total_lines) 2864 XSETINT (delta, r->total_lines - w->total_lines);
2865 - XINT (w->total_lines)); 2865 w->top_line = r->top_line;
2866 wset_top_line (w, r->top_line);
2867 resize_root_window (window, delta, Qnil, Qnil); 2866 resize_root_window (window, delta, Qnil, Qnil);
2868 if (window_resize_check (w, 0)) 2867 if (window_resize_check (w, 0))
2869 window_resize_apply (w, 0); 2868 window_resize_apply (w, 0);
@@ -2879,10 +2878,8 @@ window-start value is reasonable when this function is called. */)
2879 /* Resize child windows horizontally. */ 2878 /* Resize child windows horizontally. */
2880 if (!resize_failed) 2879 if (!resize_failed)
2881 { 2880 {
2882 wset_left_col (w, r->left_col); 2881 w->left_col = r->left_col;
2883 XSETINT (delta, 2882 XSETINT (delta, r->total_cols - w->total_cols);
2884 XINT (r->total_cols) - XINT (w->total_cols));
2885 wset_left_col (w, r->left_col);
2886 resize_root_window (window, delta, Qt, Qnil); 2883 resize_root_window (window, delta, Qt, Qnil);
2887 if (window_resize_check (w, 1)) 2884 if (window_resize_check (w, 1))
2888 window_resize_apply (w, 1); 2885 window_resize_apply (w, 1);
@@ -3453,10 +3450,6 @@ make_window (void)
3453 w = allocate_window (); 3450 w = allocate_window ();
3454 /* Initialize Lisp data. Note that allocate_window initializes all 3451 /* Initialize Lisp data. Note that allocate_window initializes all
3455 Lisp data to nil, so do it only for slots which should not be nil. */ 3452 Lisp data to nil, so do it only for slots which should not be nil. */
3456 wset_left_col (w, make_number (0));
3457 wset_top_line (w, make_number (0));
3458 wset_total_lines (w, make_number (0));
3459 wset_total_cols (w, make_number (0));
3460 wset_normal_lines (w, make_float (1.0)); 3453 wset_normal_lines (w, make_float (1.0));
3461 wset_normal_cols (w, make_float (1.0)); 3454 wset_normal_cols (w, make_float (1.0));
3462 wset_new_total (w, make_number (0)); 3455 wset_new_total (w, make_number (0));
@@ -3617,19 +3610,19 @@ window_resize_apply (struct window *w, bool horflag)
3617 parent window has been set *before*. */ 3610 parent window has been set *before*. */
3618 if (horflag) 3611 if (horflag)
3619 { 3612 {
3620 wset_total_cols (w, w->new_total); 3613 w->total_cols = XFASTINT (w->new_total);
3621 if (NUMBERP (w->new_normal)) 3614 if (NUMBERP (w->new_normal))
3622 wset_normal_cols (w, w->new_normal); 3615 wset_normal_cols (w, w->new_normal);
3623 3616
3624 pos = XINT (w->left_col); 3617 pos = w->left_col;
3625 } 3618 }
3626 else 3619 else
3627 { 3620 {
3628 wset_total_lines (w, w->new_total); 3621 w->total_lines = XFASTINT (w->new_total);
3629 if (NUMBERP (w->new_normal)) 3622 if (NUMBERP (w->new_normal))
3630 wset_normal_lines (w, w->new_normal); 3623 wset_normal_lines (w, w->new_normal);
3631 3624
3632 pos = XINT (w->top_line); 3625 pos = w->top_line;
3633 } 3626 }
3634 3627
3635 if (!NILP (w->vchild)) 3628 if (!NILP (w->vchild))
@@ -3639,12 +3632,12 @@ window_resize_apply (struct window *w, bool horflag)
3639 while (c) 3632 while (c)
3640 { 3633 {
3641 if (horflag) 3634 if (horflag)
3642 wset_left_col (c, make_number (pos)); 3635 c->left_col = pos;
3643 else 3636 else
3644 wset_top_line (c, make_number (pos)); 3637 c->top_line = pos;
3645 window_resize_apply (c, horflag); 3638 window_resize_apply (c, horflag);
3646 if (!horflag) 3639 if (!horflag)
3647 pos = pos + XINT (c->total_lines); 3640 pos = pos + c->total_lines;
3648 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3641 c = NILP (c->next) ? 0 : XWINDOW (c->next);
3649 } 3642 }
3650 } 3643 }
@@ -3655,12 +3648,12 @@ window_resize_apply (struct window *w, bool horflag)
3655 while (c) 3648 while (c)
3656 { 3649 {
3657 if (horflag) 3650 if (horflag)
3658 wset_left_col (c, make_number (pos)); 3651 c->left_col = pos;
3659 else 3652 else
3660 wset_top_line (c, make_number (pos)); 3653 c->top_line = pos;
3661 window_resize_apply (c, horflag); 3654 window_resize_apply (c, horflag);
3662 if (horflag) 3655 if (horflag)
3663 pos = pos + XINT (c->total_cols); 3656 pos = pos + c->total_cols;
3664 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3657 c = NILP (c->next) ? 0 : XWINDOW (c->next);
3665 } 3658 }
3666 } 3659 }
@@ -3692,8 +3685,8 @@ be applied on the Elisp level. */)
3692 bool horflag = !NILP (horizontal); 3685 bool horflag = !NILP (horizontal);
3693 3686
3694 if (!window_resize_check (r, horflag) 3687 if (!window_resize_check (r, horflag)
3695 || ! EQ (r->new_total, 3688 || (XINT (r->new_total)
3696 (horflag ? r->total_cols : r->total_lines))) 3689 != (horflag ? r->total_cols : r->total_lines)))
3697 return Qnil; 3690 return Qnil;
3698 3691
3699 block_input (); 3692 block_input ();
@@ -3733,18 +3726,17 @@ resize_frame_windows (struct frame *f, int size, bool horflag)
3733 - ((FRAME_HAS_MINIBUF_P (f) && !FRAME_MINIBUF_ONLY_P (f)) 3726 - ((FRAME_HAS_MINIBUF_P (f) && !FRAME_MINIBUF_ONLY_P (f))
3734 ? 1 : 0))); 3727 ? 1 : 0)));
3735 3728
3736 wset_top_line (r, make_number (FRAME_TOP_MARGIN (f))); 3729 r->top_line = FRAME_TOP_MARGIN (f);
3737 if (NILP (r->vchild) && NILP (r->hchild)) 3730 if (NILP (r->vchild) && NILP (r->hchild))
3738 /* For a leaf root window just set the size. */ 3731 /* For a leaf root window just set the size. */
3739 if (horflag) 3732 if (horflag)
3740 wset_total_cols (r, make_number (new_size)); 3733 r->total_cols = new_size;
3741 else 3734 else
3742 wset_total_lines (r, make_number (new_size)); 3735 r->total_lines = new_size;
3743 else 3736 else
3744 { 3737 {
3745 /* old_size is the old size of the frame's root window. */ 3738 /* old_size is the old size of the frame's root window. */
3746 int old_size = XFASTINT (horflag ? r->total_cols 3739 int old_size = horflag ? r->total_cols : r->total_lines;
3747 : r->total_lines);
3748 Lisp_Object delta; 3740 Lisp_Object delta;
3749 3741
3750 XSETINT (delta, new_size - old_size); 3742 XSETINT (delta, new_size - old_size);
@@ -3774,9 +3766,9 @@ resize_frame_windows (struct frame *f, int size, bool horflag)
3774 root = f->selected_window; 3766 root = f->selected_window;
3775 Fdelete_other_windows_internal (root, Qnil); 3767 Fdelete_other_windows_internal (root, Qnil);
3776 if (horflag) 3768 if (horflag)
3777 wset_total_cols (XWINDOW (root), make_number (new_size)); 3769 XWINDOW (root)->total_cols = new_size;
3778 else 3770 else
3779 wset_total_lines (XWINDOW (root), make_number (new_size)); 3771 XWINDOW (root)->total_lines = new_size;
3780 } 3772 }
3781 } 3773 }
3782 } 3774 }
@@ -3786,13 +3778,12 @@ resize_frame_windows (struct frame *f, int size, bool horflag)
3786 { 3778 {
3787 m = XWINDOW (mini); 3779 m = XWINDOW (mini);
3788 if (horflag) 3780 if (horflag)
3789 wset_total_cols (m, make_number (size)); 3781 m->total_cols = size;
3790 else 3782 else
3791 { 3783 {
3792 /* Are we sure we always want 1 line here? */ 3784 /* Are we sure we always want 1 line here? */
3793 wset_total_lines (m, make_number (1)); 3785 m->total_lines = 1;
3794 wset_top_line 3786 m->top_line = r->top_line + r->total_lines;
3795 (m, make_number (XINT (r->top_line) + XINT (r->total_lines)));
3796 } 3787 }
3797 } 3788 }
3798 3789
@@ -3876,20 +3867,21 @@ set correctly. See the code of `split-window' for how this is done. */)
3876 p = XWINDOW (o->parent); 3867 p = XWINDOW (o->parent);
3877 /* Temporarily pretend we split the parent window. */ 3868 /* Temporarily pretend we split the parent window. */
3878 wset_new_total 3869 wset_new_total
3879 (p, make_number (XINT (horflag ? p->total_cols : p->total_lines) 3870 (p, make_number ((horflag ? p->total_cols : p->total_lines)
3880 - XINT (total_size))); 3871 - XINT (total_size)));
3881 if (!window_resize_check (p, horflag)) 3872 if (!window_resize_check (p, horflag))
3882 error ("Window sizes don't fit"); 3873 error ("Window sizes don't fit");
3883 else 3874 else
3884 /* Undo the temporary pretension. */ 3875 /* Undo the temporary pretension. */
3885 wset_new_total (p, horflag ? p->total_cols : p->total_lines); 3876 wset_new_total (p, make_number
3877 (horflag ? p->total_cols : p->total_lines));
3886 } 3878 }
3887 else 3879 else
3888 { 3880 {
3889 if (!window_resize_check (o, horflag)) 3881 if (!window_resize_check (o, horflag))
3890 error ("Resizing old window failed"); 3882 error ("Resizing old window failed");
3891 else if (XINT (total_size) + XINT (o->new_total) 3883 else if (XINT (total_size) + XINT (o->new_total)
3892 != XINT (horflag ? o->total_cols : o->total_lines)) 3884 != (horflag ? o->total_cols : o->total_lines))
3893 error ("Sum of sizes of old and new window don't fit"); 3885 error ("Sum of sizes of old and new window don't fit");
3894 } 3886 }
3895 3887
@@ -3909,7 +3901,8 @@ set correctly. See the code of `split-window' for how this is done. */)
3909 that its children get merged into another window. */ 3901 that its children get merged into another window. */
3910 wset_combination_limit (p, Qt); 3902 wset_combination_limit (p, Qt);
3911 /* These get applied below. */ 3903 /* These get applied below. */
3912 wset_new_total (p, horflag ? o->total_cols : o->total_lines); 3904 wset_new_total (p, make_number
3905 (horflag ? o->total_cols : o->total_lines));
3913 wset_new_normal (p, new_normal); 3906 wset_new_normal (p, new_normal);
3914 } 3907 }
3915 else 3908 else
@@ -3961,13 +3954,13 @@ set correctly. See the code of `split-window' for how this is done. */)
3961 /* Directly assign orthogonal coordinates and sizes. */ 3954 /* Directly assign orthogonal coordinates and sizes. */
3962 if (horflag) 3955 if (horflag)
3963 { 3956 {
3964 wset_top_line (n, o->top_line); 3957 n->top_line = o->top_line;
3965 wset_total_lines (n, o->total_lines); 3958 n->total_lines = o->total_lines;
3966 } 3959 }
3967 else 3960 else
3968 { 3961 {
3969 wset_left_col (n, o->left_col); 3962 n->left_col = o->left_col;
3970 wset_total_cols (n, o->total_cols); 3963 n->total_cols = o->total_cols;
3971 } 3964 }
3972 3965
3973 /* Iso-coordinates and sizes are assigned by window_resize_apply, 3966 /* Iso-coordinates and sizes are assigned by window_resize_apply,
@@ -4056,8 +4049,8 @@ Signal an error when WINDOW is the only window on its frame. */)
4056 } 4049 }
4057 4050
4058 if (window_resize_check (r, horflag) 4051 if (window_resize_check (r, horflag)
4059 && EQ (r->new_total, 4052 && (XINT (r->new_total)
4060 (horflag ? r->total_cols : r->total_lines))) 4053 == (horflag ? r->total_cols : r->total_lines)))
4061 /* We can delete WINDOW now. */ 4054 /* We can delete WINDOW now. */
4062 { 4055 {
4063 4056
@@ -4203,10 +4196,8 @@ grow_mini_window (struct window *w, int delta)
4203 window_resize_apply (r, 0); 4196 window_resize_apply (r, 0);
4204 4197
4205 /* Grow the mini-window. */ 4198 /* Grow the mini-window. */
4206 wset_top_line 4199 w->top_line = r->top_line + r->total_lines;
4207 (w, make_number (XFASTINT (r->top_line) + XFASTINT (r->total_lines))); 4200 w->total_lines -= XINT (value);
4208 wset_total_lines
4209 (w, make_number (XFASTINT (w->total_lines) - XINT (value)));
4210 w->last_modified = 0; 4201 w->last_modified = 0;
4211 w->last_overlay_modified = 0; 4202 w->last_overlay_modified = 0;
4212 4203
@@ -4228,7 +4219,7 @@ shrink_mini_window (struct window *w)
4228 4219
4229 eassert (MINI_WINDOW_P (w)); 4220 eassert (MINI_WINDOW_P (w));
4230 4221
4231 size = XINT (w->total_lines); 4222 size = w->total_lines;
4232 if (size > 1) 4223 if (size > 1)
4233 { 4224 {
4234 root = FRAME_ROOT_WINDOW (f); 4225 root = FRAME_ROOT_WINDOW (f);
@@ -4241,9 +4232,8 @@ shrink_mini_window (struct window *w)
4241 window_resize_apply (r, 0); 4232 window_resize_apply (r, 0);
4242 4233
4243 /* Shrink the mini-window. */ 4234 /* Shrink the mini-window. */
4244 wset_top_line (w, make_number (XFASTINT (r->top_line) 4235 w->top_line = r->top_line + r->total_lines;
4245 + XFASTINT (r->total_lines))); 4236 w->total_lines = 1;
4246 wset_total_lines (w, make_number (1));
4247 4237
4248 w->last_modified = 0; 4238 w->last_modified = 0;
4249 w->last_overlay_modified = 0; 4239 w->last_overlay_modified = 0;
@@ -4277,7 +4267,7 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini
4277 error ("Cannot resize a minibuffer-only frame"); 4267 error ("Cannot resize a minibuffer-only frame");
4278 4268
4279 r = XWINDOW (FRAME_ROOT_WINDOW (f)); 4269 r = XWINDOW (FRAME_ROOT_WINDOW (f));
4280 height = XINT (r->total_lines) + XINT (w->total_lines); 4270 height = r->total_lines + w->total_lines;
4281 if (window_resize_check (r, 0) 4271 if (window_resize_check (r, 0)
4282 && XINT (w->new_total) > 0 4272 && XINT (w->new_total) > 0
4283 && height == XINT (r->new_total) + XINT (w->new_total)) 4273 && height == XINT (r->new_total) + XINT (w->new_total))
@@ -4285,9 +4275,8 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini
4285 block_input (); 4275 block_input ();
4286 window_resize_apply (r, 0); 4276 window_resize_apply (r, 0);
4287 4277
4288 wset_total_lines (w, w->new_total); 4278 w->total_lines = XFASTINT (w->new_total);
4289 wset_top_line (w, make_number (XINT (r->top_line) 4279 w->top_line = r->top_line + r->total_lines;
4290 + XINT (r->total_lines)));
4291 4280
4292 windows_or_buffers_changed++; 4281 windows_or_buffers_changed++;
4293 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 4282 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
@@ -4327,7 +4316,7 @@ mark_window_cursors_off (struct window *w)
4327int 4316int
4328window_internal_height (struct window *w) 4317window_internal_height (struct window *w)
4329{ 4318{
4330 int ht = XFASTINT (w->total_lines); 4319 int ht = w->total_lines;
4331 4320
4332 if (!MINI_WINDOW_P (w)) 4321 if (!MINI_WINDOW_P (w))
4333 { 4322 {
@@ -4637,7 +4626,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror)
4637 even if there is a header line. */ 4626 even if there is a header line. */
4638 this_scroll_margin = max (0, scroll_margin); 4627 this_scroll_margin = max (0, scroll_margin);
4639 this_scroll_margin 4628 this_scroll_margin
4640 = min (this_scroll_margin, XFASTINT (w->total_lines) / 4); 4629 = min (this_scroll_margin, w->total_lines / 4);
4641 this_scroll_margin *= FRAME_LINE_HEIGHT (it.f); 4630 this_scroll_margin *= FRAME_LINE_HEIGHT (it.f);
4642 4631
4643 if (n > 0) 4632 if (n > 0)
@@ -4814,7 +4803,7 @@ window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror)
4814 { 4803 {
4815 /* Don't use a scroll margin that is negative or too large. */ 4804 /* Don't use a scroll margin that is negative or too large. */
4816 int this_scroll_margin = 4805 int this_scroll_margin =
4817 max (0, min (scroll_margin, XINT (w->total_lines) / 4)); 4806 max (0, min (scroll_margin, w->total_lines / 4));
4818 4807
4819 set_marker_restricted_both (w->start, w->buffer, pos, pos_byte); 4808 set_marker_restricted_both (w->start, w->buffer, pos, pos_byte);
4820 w->start_at_line_beg = !NILP (bolp); 4809 w->start_at_line_beg = !NILP (bolp);
@@ -5231,7 +5220,7 @@ and redisplay normally--don't erase and redraw the frame. */)
5231 /* Do this after making BUF current 5220 /* Do this after making BUF current
5232 in case scroll_margin is buffer-local. */ 5221 in case scroll_margin is buffer-local. */
5233 this_scroll_margin = 5222 this_scroll_margin =
5234 max (0, min (scroll_margin, XFASTINT (w->total_lines) / 4)); 5223 max (0, min (scroll_margin, w->total_lines / 4));
5235 5224
5236 /* Handle centering on a graphical frame specially. Such frames can 5225 /* Handle centering on a graphical frame specially. Such frames can
5237 have variable-height lines and centering point on the basis of 5226 have variable-height lines and centering point on the basis of
@@ -5705,7 +5694,7 @@ the return value is nil. Otherwise the value is t. */)
5705 wset_prev (w, Qnil); 5694 wset_prev (w, Qnil);
5706 if (!NILP (w->parent)) 5695 if (!NILP (w->parent))
5707 { 5696 {
5708 if (EQ (p->total_cols, XWINDOW (w->parent)->total_cols)) 5697 if (XINT (p->total_cols) == XWINDOW (w->parent)->total_cols)
5709 { 5698 {
5710 wset_vchild (XWINDOW (w->parent), p->window); 5699 wset_vchild (XWINDOW (w->parent), p->window);
5711 wset_hchild (XWINDOW (w->parent), Qnil); 5700 wset_hchild (XWINDOW (w->parent), Qnil);
@@ -5721,10 +5710,10 @@ the return value is nil. Otherwise the value is t. */)
5721 /* If we squirreled away the buffer, restore it now. */ 5710 /* If we squirreled away the buffer, restore it now. */
5722 if (BUFFERP (w->combination_limit)) 5711 if (BUFFERP (w->combination_limit))
5723 wset_buffer (w, w->combination_limit); 5712 wset_buffer (w, w->combination_limit);
5724 wset_left_col (w, p->left_col); 5713 w->left_col = XFASTINT (p->left_col);
5725 wset_top_line (w, p->top_line); 5714 w->top_line = XFASTINT (p->top_line);
5726 wset_total_cols (w, p->total_cols); 5715 w->total_cols = XFASTINT (p->total_cols);
5727 wset_total_lines (w, p->total_lines); 5716 w->total_lines = XFASTINT (p->total_lines);
5728 wset_normal_cols (w, p->normal_cols); 5717 wset_normal_cols (w, p->normal_cols);
5729 wset_normal_lines (w, p->normal_lines); 5718 wset_normal_lines (w, p->normal_lines);
5730 w->hscroll = XFASTINT (p->hscroll); 5719 w->hscroll = XFASTINT (p->hscroll);
@@ -6038,10 +6027,10 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
6038 wset_temslot (w, make_number (i)); i++; 6027 wset_temslot (w, make_number (i)); i++;
6039 p->window = window; 6028 p->window = window;
6040 p->buffer = w->buffer; 6029 p->buffer = w->buffer;
6041 p->left_col = w->left_col; 6030 p->left_col = make_number (w->left_col);
6042 p->top_line = w->top_line; 6031 p->top_line = make_number (w->top_line);
6043 p->total_cols = w->total_cols; 6032 p->total_cols = make_number (w->total_cols);
6044 p->total_lines = w->total_lines; 6033 p->total_lines = make_number (w->total_lines);
6045 p->normal_cols = w->normal_cols; 6034 p->normal_cols = w->normal_cols;
6046 p->normal_lines = w->normal_lines; 6035 p->normal_lines = w->normal_lines;
6047 XSETFASTINT (p->hscroll, w->hscroll); 6036 XSETFASTINT (p->hscroll, w->hscroll);
diff --git a/src/window.h b/src/window.h
index 4af8dbf1591..4f6374b9d3e 100644
--- a/src/window.h
+++ b/src/window.h
@@ -112,20 +112,14 @@ struct window
112 /* The window this one is a child of. */ 112 /* The window this one is a child of. */
113 Lisp_Object parent; 113 Lisp_Object parent;
114 114
115 /* The upper left corner coordinates of this window, as integers 115 /* The normal size of the window. These are fractions, but we do
116 relative to upper left corner of frame = 0, 0. */ 116 not use C doubles to avoid creating new Lisp_Float objects while
117 Lisp_Object left_col; 117 interfacing Lisp in Fwindow_normal_size. */
118 Lisp_Object top_line;
119
120 /* The size of the window. */
121 Lisp_Object total_lines;
122 Lisp_Object total_cols;
123
124 /* The normal size of the window. */
125 Lisp_Object normal_lines; 118 Lisp_Object normal_lines;
126 Lisp_Object normal_cols; 119 Lisp_Object normal_cols;
127 120
128 /* New sizes of the window. */ 121 /* New sizes of the window. Note that Lisp code may set new_normal
122 to something beyond an integer, so C int can't be used here. */
129 Lisp_Object new_total; 123 Lisp_Object new_total;
130 Lisp_Object new_normal; 124 Lisp_Object new_normal;
131 125
@@ -221,6 +215,15 @@ struct window
221 /* Number saying how recently window was selected. */ 215 /* Number saying how recently window was selected. */
222 int use_time; 216 int use_time;
223 217
218 /* The upper left corner coordinates of this window,
219 relative to upper left corner of frame = 0, 0. */
220 int left_col;
221 int top_line;
222
223 /* The size of the window. */
224 int total_lines;
225 int total_cols;
226
224 /* Number of columns display within the window is scrolled to the left. */ 227 /* Number of columns display within the window is scrolled to the left. */
225 ptrdiff_t hscroll; 228 ptrdiff_t hscroll;
226 229
@@ -354,11 +357,6 @@ wset_frame (struct window *w, Lisp_Object val)
354 w->frame = val; 357 w->frame = val;
355} 358}
356WINDOW_INLINE void 359WINDOW_INLINE void
357wset_left_col (struct window *w, Lisp_Object val)
358{
359 w->left_col = val;
360}
361WINDOW_INLINE void
362wset_next (struct window *w, Lisp_Object val) 360wset_next (struct window *w, Lisp_Object val)
363{ 361{
364 w->next = val; 362 w->next = val;
@@ -374,21 +372,6 @@ wset_redisplay_end_trigger (struct window *w, Lisp_Object val)
374 w->redisplay_end_trigger = val; 372 w->redisplay_end_trigger = val;
375} 373}
376WINDOW_INLINE void 374WINDOW_INLINE void
377wset_top_line (struct window *w, Lisp_Object val)
378{
379 w->top_line = val;
380}
381WINDOW_INLINE void
382wset_total_cols (struct window *w, Lisp_Object val)
383{
384 w->total_cols = val;
385}
386WINDOW_INLINE void
387wset_total_lines (struct window *w, Lisp_Object val)
388{
389 w->total_lines = val;
390}
391WINDOW_INLINE void
392wset_vertical_scroll_bar (struct window *w, Lisp_Object val) 375wset_vertical_scroll_bar (struct window *w, Lisp_Object val)
393{ 376{
394 w->vertical_scroll_bar = val; 377 w->vertical_scroll_bar = val;
@@ -461,14 +444,12 @@ wset_next_buffers (struct window *w, Lisp_Object val)
461/* Return the width of window W in canonical column units. 444/* Return the width of window W in canonical column units.
462 This includes scroll bars and fringes. */ 445 This includes scroll bars and fringes. */
463 446
464#define WINDOW_TOTAL_COLS(W) \ 447#define WINDOW_TOTAL_COLS(W) (W)->total_cols
465 (XFASTINT (W->total_cols))
466 448
467/* Return the height of window W in canonical line units. 449/* Return the height of window W in canonical line units.
468 This includes header and mode lines, if any. */ 450 This includes header and mode lines, if any. */
469 451
470#define WINDOW_TOTAL_LINES(W) \ 452#define WINDOW_TOTAL_LINES(W) (W)->total_lines
471 (XFASTINT (W->total_lines))
472 453
473/* Return the total pixel width of window W. */ 454/* Return the total pixel width of window W. */
474 455
@@ -495,8 +476,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
495/* Return the canonical frame column at which window W starts. 476/* Return the canonical frame column at which window W starts.
496 This includes a left-hand scroll bar, if any. */ 477 This includes a left-hand scroll bar, if any. */
497 478
498#define WINDOW_LEFT_EDGE_COL(W) \ 479#define WINDOW_LEFT_EDGE_COL(W) (W)->left_col
499 (XFASTINT (W->left_col))
500 480
501/* Return the canonical frame column before which window W ends. 481/* Return the canonical frame column before which window W ends.
502 This includes a right-hand scroll bar, if any. */ 482 This includes a right-hand scroll bar, if any. */
@@ -507,8 +487,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
507/* Return the canonical frame line at which window W starts. 487/* Return the canonical frame line at which window W starts.
508 This includes a header line, if any. */ 488 This includes a header line, if any. */
509 489
510#define WINDOW_TOP_EDGE_LINE(W) \ 490#define WINDOW_TOP_EDGE_LINE(W) (W)->top_line
511 (XFASTINT (W->top_line))
512 491
513/* Return the canonical frame line before which window W ends. 492/* Return the canonical frame line before which window W ends.
514 This includes a mode line, if any. */ 493 This includes a mode line, if any. */
diff --git a/src/xdisp.c b/src/xdisp.c
index 667597b93c3..2a565b5cffd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -979,7 +979,7 @@ window_text_bottom_y (struct window *w)
979int 979int
980window_box_width (struct window *w, int area) 980window_box_width (struct window *w, int area)
981{ 981{
982 int cols = XFASTINT (w->total_cols); 982 int cols = w->total_cols;
983 int pixels = 0; 983 int pixels = 0;
984 984
985 if (!w->pseudo_window_p) 985 if (!w->pseudo_window_p)
@@ -29218,13 +29218,13 @@ init_xdisp (void)
29218 29218
29219 echo_area_window = minibuf_window; 29219 echo_area_window = minibuf_window;
29220 29220
29221 wset_top_line (r, make_number (FRAME_TOP_MARGIN (f))); 29221 r->top_line = FRAME_TOP_MARGIN (f);
29222 wset_total_lines 29222 r->total_lines = FRAME_LINES (f) - 1 - FRAME_TOP_MARGIN (f);
29223 (r, make_number (FRAME_LINES (f) - 1 - FRAME_TOP_MARGIN (f))); 29223 r->total_cols = FRAME_COLS (f);
29224 wset_total_cols (r, make_number (FRAME_COLS (f))); 29224
29225 wset_top_line (m, make_number (FRAME_LINES (f) - 1)); 29225 m->top_line = FRAME_LINES (f) - 1;
29226 wset_total_lines (m, make_number (1)); 29226 m->total_lines = 1;
29227 wset_total_cols (m, make_number (FRAME_COLS (f))); 29227 m->total_cols = FRAME_COLS (f);
29228 29228
29229 scratch_glyph_row.glyphs[TEXT_AREA] = scratch_glyphs; 29229 scratch_glyph_row.glyphs[TEXT_AREA] = scratch_glyphs;
29230 scratch_glyph_row.glyphs[TEXT_AREA + 1] 29230 scratch_glyph_row.glyphs[TEXT_AREA + 1]
diff --git a/src/xfns.c b/src/xfns.c
index 385c5914d91..488365561d3 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5021,23 +5021,23 @@ Text larger than the specified size is clipped. */)
5021 5021
5022 /* Set up the frame's root window. */ 5022 /* Set up the frame's root window. */
5023 w = XWINDOW (FRAME_ROOT_WINDOW (f)); 5023 w = XWINDOW (FRAME_ROOT_WINDOW (f));
5024 wset_left_col (w, make_number (0)); 5024 w->left_col = 0;
5025 wset_top_line (w, make_number (0)); 5025 w->top_line = 0;
5026 5026
5027 if (CONSP (Vx_max_tooltip_size) 5027 if (CONSP (Vx_max_tooltip_size)
5028 && RANGED_INTEGERP (1, XCAR (Vx_max_tooltip_size), INT_MAX) 5028 && RANGED_INTEGERP (1, XCAR (Vx_max_tooltip_size), INT_MAX)
5029 && RANGED_INTEGERP (1, XCDR (Vx_max_tooltip_size), INT_MAX)) 5029 && RANGED_INTEGERP (1, XCDR (Vx_max_tooltip_size), INT_MAX))
5030 { 5030 {
5031 wset_total_cols (w, XCAR (Vx_max_tooltip_size)); 5031 w->total_cols = XFASTINT (XCAR (Vx_max_tooltip_size));
5032 wset_total_lines (w, XCDR (Vx_max_tooltip_size)); 5032 w->total_lines = XFASTINT (XCDR (Vx_max_tooltip_size));
5033 } 5033 }
5034 else 5034 else
5035 { 5035 {
5036 wset_total_cols (w, make_number (80)); 5036 w->total_cols = 80;
5037 wset_total_lines (w, make_number (40)); 5037 w->total_lines = 40;
5038 } 5038 }
5039 5039
5040 FRAME_TOTAL_COLS (f) = XINT (w->total_cols); 5040 FRAME_TOTAL_COLS (f) = w->total_cols;
5041 adjust_glyphs (f); 5041 adjust_glyphs (f);
5042 w->pseudo_window_p = 1; 5042 w->pseudo_window_p = 1;
5043 5043
@@ -5104,7 +5104,7 @@ Text larger than the specified size is clipped. */)
5104 /* w->total_cols and FRAME_TOTAL_COLS want the width in columns, 5104 /* w->total_cols and FRAME_TOTAL_COLS want the width in columns,
5105 not in pixels. */ 5105 not in pixels. */
5106 width /= WINDOW_FRAME_COLUMN_WIDTH (w); 5106 width /= WINDOW_FRAME_COLUMN_WIDTH (w);
5107 wset_total_cols (w, make_number (width)); 5107 w->total_cols = width;
5108 FRAME_TOTAL_COLS (f) = width; 5108 FRAME_TOTAL_COLS (f) = width;
5109 adjust_glyphs (f); 5109 adjust_glyphs (f);
5110 clear_glyph_matrix (w->desired_matrix); 5110 clear_glyph_matrix (w->desired_matrix);