aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-12-04 16:19:04 +0000
committerGerd Moellmann2000-12-04 16:19:04 +0000
commit4bc6dcc75419d6e5127f9ffc76a92796f40e03b5 (patch)
tree0cde68f92fc7e6b206bdd3aca9d2d566cafd9f5d /src
parent11dac025431b2e87d070ecb79e4226016eabb898 (diff)
downloademacs-4bc6dcc75419d6e5127f9ffc76a92796f40e03b5.tar.gz
emacs-4bc6dcc75419d6e5127f9ffc76a92796f40e03b5.zip
(expose_area): Pass x-coordinate relative to the exposed
area to x_draw_glyphs instead of a window-relative coordinate.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 42537902c94..9158cdd1761 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -5709,31 +5709,31 @@ expose_area (w, row, r, area)
5709 XRectangle *r; 5709 XRectangle *r;
5710 enum glyph_row_area area; 5710 enum glyph_row_area area;
5711{ 5711{
5712 int x;
5713 struct glyph *first = row->glyphs[area]; 5712 struct glyph *first = row->glyphs[area];
5714 struct glyph *end = row->glyphs[area] + row->used[area]; 5713 struct glyph *end = row->glyphs[area] + row->used[area];
5715 struct glyph *last; 5714 struct glyph *last;
5716 int first_x; 5715 int first_x, start_x, x;
5717
5718 /* Set x to the window-relative start position for drawing glyphs of
5719 AREA. The first glyph of the text area can be partially visible.
5720 The first glyphs of other areas cannot. */
5721 if (area == LEFT_MARGIN_AREA)
5722 x = 0;
5723 else if (area == TEXT_AREA)
5724 x = row->x + window_box_width (w, LEFT_MARGIN_AREA);
5725 else
5726 x = (window_box_width (w, LEFT_MARGIN_AREA)
5727 + window_box_width (w, TEXT_AREA));
5728 5716
5729 if (area == TEXT_AREA && row->fill_line_p) 5717 if (area == TEXT_AREA && row->fill_line_p)
5730 /* If row extends face to end of line write the whole line. */ 5718 /* If row extends face to end of line write the whole line. */
5731 x_draw_glyphs (w, x, row, area, 5719 x_draw_glyphs (w, 0, row, area,
5732 0, row->used[area], 5720 0, row->used[area],
5733 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, 5721 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT,
5734 NULL, NULL, 0); 5722 NULL, NULL, 0);
5735 else 5723 else
5736 { 5724 {
5725 /* Set START_X to the window-relative start position for drawing glyphs of
5726 AREA. The first glyph of the text area can be partially visible.
5727 The first glyphs of other areas cannot. */
5728 if (area == LEFT_MARGIN_AREA)
5729 start_x = 0;
5730 else if (area == TEXT_AREA)
5731 start_x = row->x + window_box_width (w, LEFT_MARGIN_AREA);
5732 else
5733 start_x = (window_box_width (w, LEFT_MARGIN_AREA)
5734 + window_box_width (w, TEXT_AREA));
5735 x = start_x;
5736
5737 /* Find the first glyph that must be redrawn. */ 5737 /* Find the first glyph that must be redrawn. */
5738 while (first < end 5738 while (first < end
5739 && x + first->pixel_width < r->x) 5739 && x + first->pixel_width < r->x)
@@ -5754,7 +5754,7 @@ expose_area (w, row, r, area)
5754 5754
5755 /* Repaint. */ 5755 /* Repaint. */
5756 if (last > first) 5756 if (last > first)
5757 x_draw_glyphs (w, first_x, row, area, 5757 x_draw_glyphs (w, first_x - start_x, row, area,
5758 first - row->glyphs[area], 5758 first - row->glyphs[area],
5759 last - row->glyphs[area], 5759 last - row->glyphs[area],
5760 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, 5760 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT,