aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2009-06-22 02:01:56 +0000
committerChong Yidong2009-06-22 02:01:56 +0000
commit9a01ee3357b353a4bcfbd94a85fd25047aaf429e (patch)
treeedbd0ce70fefb73389aa539949060cfd538e2a19 /src
parent8a668709c216fe2deab4e22967c89a66381fd9de (diff)
downloademacs-9a01ee3357b353a4bcfbd94a85fd25047aaf429e.tar.gz
emacs-9a01ee3357b353a4bcfbd94a85fd25047aaf429e.zip
* 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).
Diffstat (limited to 'src')
-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 5ffadfb9f86..c6378077d5c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,13 @@
12009-06-22 Chong Yidong <cyd@stupidchicken.com> 12009-06-22 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * w32term.c (x_draw_glyph_string): Use the glyph string's width
4 rather than its background_width for drawing the overline and
5 underline (Bug#489).
6
7 * xterm.c (x_draw_glyph_string): Use the glyph string's width
8 rather than its background_width for drawing the overline and
9 underline (Bug#489).
10
3 * xdisp.c (Qbefore_string, Qafter_string): Add externs. 11 * xdisp.c (Qbefore_string, Qafter_string): Add externs.
4 (load_overlay_strings): Remove externs. 12 (load_overlay_strings): Remove externs.
5 (fast_find_position): Function deleted. 13 (fast_find_position): Function deleted.
diff --git a/src/w32term.c b/src/w32term.c
index f96a60d777f..209e86edc8b 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2401,12 +2401,12 @@ x_draw_glyph_string (s)
2401 if (s->face->underline_defaulted_p) 2401 if (s->face->underline_defaulted_p)
2402 { 2402 {
2403 w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, 2403 w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
2404 y, s->background_width, 1); 2404 y, s->width, 1);
2405 } 2405 }
2406 else 2406 else
2407 { 2407 {
2408 w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x, 2408 w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x,
2409 y, s->background_width, 1); 2409 y, s->width, 1);
2410 } 2410 }
2411 } 2411 }
2412 /* Draw overline. */ 2412 /* Draw overline. */
@@ -2417,12 +2417,12 @@ x_draw_glyph_string (s)
2417 if (s->face->overline_color_defaulted_p) 2417 if (s->face->overline_color_defaulted_p)
2418 { 2418 {
2419 w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, 2419 w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
2420 s->y + dy, s->background_width, h); 2420 s->y + dy, s->width, h);
2421 } 2421 }
2422 else 2422 else
2423 { 2423 {
2424 w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x, 2424 w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x,
2425 s->y + dy, s->background_width, h); 2425 s->y + dy, s->width, h);
2426 } 2426 }
2427 } 2427 }
2428 2428
diff --git a/src/xterm.c b/src/xterm.c
index e3d4611523e..f09a02c2f04 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2793,14 +2793,14 @@ x_draw_glyph_string (s)
2793 y = s->ybase + position; 2793 y = s->ybase + position;
2794 if (s->face->underline_defaulted_p) 2794 if (s->face->underline_defaulted_p)
2795 XFillRectangle (s->display, s->window, s->gc, 2795 XFillRectangle (s->display, s->window, s->gc,
2796 s->x, y, s->background_width, thickness); 2796 s->x, y, s->width, thickness);
2797 else 2797 else
2798 { 2798 {
2799 XGCValues xgcv; 2799 XGCValues xgcv;
2800 XGetGCValues (s->display, s->gc, GCForeground, &xgcv); 2800 XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
2801 XSetForeground (s->display, s->gc, s->face->underline_color); 2801 XSetForeground (s->display, s->gc, s->face->underline_color);
2802 XFillRectangle (s->display, s->window, s->gc, 2802 XFillRectangle (s->display, s->window, s->gc,
2803 s->x, y, s->background_width, thickness); 2803 s->x, y, s->width, thickness);
2804 XSetForeground (s->display, s->gc, xgcv.foreground); 2804 XSetForeground (s->display, s->gc, xgcv.foreground);
2805 } 2805 }
2806 } 2806 }
@@ -2812,14 +2812,14 @@ x_draw_glyph_string (s)
2812 2812
2813 if (s->face->overline_color_defaulted_p) 2813 if (s->face->overline_color_defaulted_p)
2814 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy, 2814 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
2815 s->background_width, h); 2815 s->width, h);
2816 else 2816 else
2817 { 2817 {
2818 XGCValues xgcv; 2818 XGCValues xgcv;
2819 XGetGCValues (s->display, s->gc, GCForeground, &xgcv); 2819 XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
2820 XSetForeground (s->display, s->gc, s->face->overline_color); 2820 XSetForeground (s->display, s->gc, s->face->overline_color);
2821 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy, 2821 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
2822 s->background_width, h); 2822 s->width, h);
2823 XSetForeground (s->display, s->gc, xgcv.foreground); 2823 XSetForeground (s->display, s->gc, xgcv.foreground);
2824 } 2824 }
2825 } 2825 }