aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2008-05-23 05:33:24 +0000
committerKenichi Handa2008-05-23 05:33:24 +0000
commit90dc78a36ea3c20e8c87b27f7d96b86262d292bb (patch)
tree6183911fa2def6d25c209842c8ff4eae51d27109 /src
parent05012a713a11f0e8484d7a0b6c5a50b0d76b8cd2 (diff)
downloademacs-90dc78a36ea3c20e8c87b27f7d96b86262d292bb.tar.gz
emacs-90dc78a36ea3c20e8c87b27f7d96b86262d292bb.zip
(x_draw_glyph_string): Be sure to draw underline within the current
line area.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xterm.c6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3dd1a95177e..62ea887f9f0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -4,7 +4,8 @@
4 s->underline_thickness and s->underline_position. 4 s->underline_thickness and s->underline_position.
5 5
6 * xterm.c (x_draw_glyph_string): Be sure to update 6 * xterm.c (x_draw_glyph_string): Be sure to update
7 s->underline_thickness and s->underline_position. 7 s->underline_thickness and s->underline_position. Be sore to draw
8 underline within the current line area.
8 9
9 * fontset.c: Delete unused variables and add casting for char * 10 * fontset.c: Delete unused variables and add casting for char *
10 throughout the file. 11 throughout the file.
diff --git a/src/xterm.c b/src/xterm.c
index b4c49d4085f..b2683298ca0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2743,6 +2743,12 @@ x_draw_glyph_string (s)
2743 position = (s->font->descent + 1) / 2; 2743 position = (s->font->descent + 1) / 2;
2744 } 2744 }
2745 } 2745 }
2746 /* Check the sanity of thickness and position. We should
2747 avoid drawing underline out of the current line area. */
2748 if (s->y + s->height <= s->ybase + position)
2749 position = s->y + s->height - 1;
2750 if (s->y + s->height < s->ybase + position + thickness)
2751 thickness = (s->y + s->height) - (s->ybase + position);
2746 s->underline_thickness = thickness; 2752 s->underline_thickness = thickness;
2747 s->underline_position = position; 2753 s->underline_position = position;
2748 y = s->ybase + position; 2754 y = s->ybase + position;