aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong <[email protected]>2009-06-22 02:01:56 +0000
committerChong Yidong <[email protected]>2009-06-22 02:01:56 +0000
commit9a01ee3357b353a4bcfbd94a85fd25047aaf429e (patch)
treeedbd0ce70fefb73389aa539949060cfd538e2a19
parent8a668709c216fe2deab4e22967c89a66381fd9de (diff)
* w32term.c (x_draw_glyph_string): Use the glyph string's width
rather than its background_width for drawing the overline and underline (Bug#489). * xterm.c (x_draw_glyph_string): Use the glyph string's width rather than its background_width for drawing the overline and underline (Bug#489).
-rw-r--r--src/ChangeLog8
-rw-r--r--src/w32term.c8
-rw-r--r--src/xterm.c8
3 files changed, 16 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5ffadfb9f8..c6378077d5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,13 @@
2009-06-22 Chong Yidong <[email protected]>
+ * w32term.c (x_draw_glyph_string): Use the glyph string's width
+ rather than its background_width for drawing the overline and
+ underline (Bug#489).
+
+ * xterm.c (x_draw_glyph_string): Use the glyph string's width
+ rather than its background_width for drawing the overline and
+ underline (Bug#489).
+
* xdisp.c (Qbefore_string, Qafter_string): Add externs.
(load_overlay_strings): Remove externs.
(fast_find_position): Function deleted.
diff --git a/src/w32term.c b/src/w32term.c
index f96a60d777..209e86edc8 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2401,12 +2401,12 @@ x_draw_glyph_string (s)
if (s->face->underline_defaulted_p)
{
w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
- y, s->background_width, 1);
+ y, s->width, 1);
}
else
{
w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x,
- y, s->background_width, 1);
+ y, s->width, 1);
}
}
/* Draw overline. */
@@ -2417,12 +2417,12 @@ x_draw_glyph_string (s)
if (s->face->overline_color_defaulted_p)
{
w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
- s->y + dy, s->background_width, h);
+ s->y + dy, s->width, h);
}
else
{
w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x,
- s->y + dy, s->background_width, h);
+ s->y + dy, s->width, h);
}
}
diff --git a/src/xterm.c b/src/xterm.c
index e3d4611523..f09a02c2f0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2793,14 +2793,14 @@ x_draw_glyph_string (s)
y = s->ybase + position;
if (s->face->underline_defaulted_p)
XFillRectangle (s->display, s->window, s->gc,
- s->x, y, s->background_width, thickness);
+ s->x, y, s->width, thickness);
else
{
XGCValues xgcv;
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
XSetForeground (s->display, s->gc, s->face->underline_color);
XFillRectangle (s->display, s->window, s->gc,
- s->x, y, s->background_width, thickness);
+ s->x, y, s->width, thickness);
XSetForeground (s->display, s->gc, xgcv.foreground);
}
}
@@ -2812,14 +2812,14 @@ x_draw_glyph_string (s)
if (s->face->overline_color_defaulted_p)
XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
- s->background_width, h);
+ s->width, h);
else
{
XGCValues xgcv;
XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
XSetForeground (s->display, s->gc, s->face->overline_color);
XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
- s->background_width, h);
+ s->width, h);
XSetForeground (s->display, s->gc, xgcv.foreground);
}
}