]> git.eshelyaron.com Git - emacs.git/commitdiff
(margin_glyphs_to_reserve): Apply ncols_scale_factor.
authorKim F. Storm <storm@cua.dk>
Wed, 21 Jul 2004 21:08:23 +0000 (21:08 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 21 Jul 2004 21:08:23 +0000 (21:08 +0000)
(allocate_matrices_for_frame_redisplay): Fix left/right margin mix-up.
(required_matrix_height): Apply nrows_scale_factor.
(required_matrix_width): Apply ncols_scale_factor.

src/dispnew.c

index 5ceebdecf3483f6a9e4ef58371c8a0228cd87fe7..8a713857273a9b23d6ce6a2e37819b7e1fed46da 100644 (file)
@@ -579,7 +579,7 @@ margin_glyphs_to_reserve (w, total_glyphs, margin)
       int width = XFASTINT (w->total_cols);
       double d = max (0, XFLOATINT (margin));
       d = min (width / 2 - 1, d);
-      n = (int) ((double) total_glyphs / width * d);
+      n = (int) ((double) total_glyphs / width * d) * w->ncols_scale_factor;
     }
   else
     n = 0;
@@ -1911,10 +1911,10 @@ allocate_matrices_for_frame_redisplay (window, x, y, dim_only_p,
              || dim.width != w->desired_matrix->matrix_w
              || dim.height != w->desired_matrix->matrix_h
              || (margin_glyphs_to_reserve (w, dim.width,
-                                           w->right_margin_cols)
+                                           w->left_margin_cols)
                  != w->desired_matrix->left_margin_glyphs)
              || (margin_glyphs_to_reserve (w, dim.width,
-                                           w->left_margin_cols)
+                                           w->right_margin_cols)
                  != w->desired_matrix->right_margin_glyphs))
            *window_change_flags |= CHANGED_LEAF_MATRIX;
 
@@ -1982,7 +1982,7 @@ required_matrix_height (w)
       int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f);
       int window_pixel_height = window_box_height (w) + abs (w->vscroll);
       return (((window_pixel_height + ch_height - 1)
-              / ch_height)
+              / ch_height) * w->nrows_scale_factor
              /* One partially visible line at the top and
                 bottom of the window.  */
              + 2
@@ -2010,7 +2010,7 @@ required_matrix_width (w)
 
       /* Compute number of glyphs needed in a glyph row.  */
       return (((window_pixel_width + ch_width - 1)
-              / ch_width)
+              / ch_width) * w->ncols_scale_factor
              /* 2 partially visible columns in the text area.  */
              + 2
              /* One partially visible column at the right