diff options
| author | Kenichi Handa | 2001-03-14 13:18:05 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2001-03-14 13:18:05 +0000 |
| commit | 4458cf11f717f89a2cd0ef1bd92573b74dbcd016 (patch) | |
| tree | c2e0a89e9a9bad9fd0a58dd1c4995ffb24bcec43 /src | |
| parent | f920e581ee735afcaceb842f7e4a393cf6854539 (diff) | |
| download | emacs-4458cf11f717f89a2cd0ef1bd92573b74dbcd016.tar.gz emacs-4458cf11f717f89a2cd0ef1bd92573b74dbcd016.zip | |
(x_draw_glyph_string): Draw relief (if any) before
drawing glyph string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c index 158db55612b..7652bbb0453 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4252,6 +4252,8 @@ static void | |||
| 4252 | x_draw_glyph_string (s) | 4252 | x_draw_glyph_string (s) |
| 4253 | struct glyph_string *s; | 4253 | struct glyph_string *s; |
| 4254 | { | 4254 | { |
| 4255 | int relief_drawn_p = 0; | ||
| 4256 | |||
| 4255 | /* If S draws into the background of its successor, draw the | 4257 | /* If S draws into the background of its successor, draw the |
| 4256 | background of the successor first so that S can draw into it. | 4258 | background of the successor first so that S can draw into it. |
| 4257 | This makes S->next use XDrawString instead of XDrawImageString. */ | 4259 | This makes S->next use XDrawString instead of XDrawImageString. */ |
| @@ -4267,6 +4269,19 @@ x_draw_glyph_string (s) | |||
| 4267 | x_set_glyph_string_gc (s); | 4269 | x_set_glyph_string_gc (s); |
| 4268 | x_set_glyph_string_clipping (s); | 4270 | x_set_glyph_string_clipping (s); |
| 4269 | 4271 | ||
| 4272 | /* Draw relief (if any) in advance for char/composition so that the | ||
| 4273 | glyph string can be drawn over it. */ | ||
| 4274 | if (!s->for_overlaps_p | ||
| 4275 | && s->face->box != FACE_NO_BOX | ||
| 4276 | && (s->first_glyph->type == CHAR_GLYPH | ||
| 4277 | || s->first_glyph->type == COMPOSITE_GLYPH)) | ||
| 4278 | |||
| 4279 | { | ||
| 4280 | x_draw_glyph_string_background (s, 1); | ||
| 4281 | x_draw_glyph_string_box (s); | ||
| 4282 | relief_drawn_p = 1; | ||
| 4283 | } | ||
| 4284 | |||
| 4270 | switch (s->first_glyph->type) | 4285 | switch (s->first_glyph->type) |
| 4271 | { | 4286 | { |
| 4272 | case IMAGE_GLYPH: | 4287 | case IMAGE_GLYPH: |
| @@ -4377,8 +4392,8 @@ x_draw_glyph_string (s) | |||
| 4377 | } | 4392 | } |
| 4378 | } | 4393 | } |
| 4379 | 4394 | ||
| 4380 | /* Draw relief. */ | 4395 | /* Draw relief if not yet drawn. */ |
| 4381 | if (s->face->box != FACE_NO_BOX) | 4396 | if (!relief_drawn_p && s->face->box != FACE_NO_BOX) |
| 4382 | x_draw_glyph_string_box (s); | 4397 | x_draw_glyph_string_box (s); |
| 4383 | } | 4398 | } |
| 4384 | 4399 | ||