aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2010-11-01 16:35:04 +0900
committerKenichi Handa2010-11-01 16:35:04 +0900
commit65b6b59a8030b09d2a32ee88837a061e22751988 (patch)
treeec59f4cbb9e9eca472cfb6a5e82158fe4bfdab0b /src
parentb18fad6db4efeda274dcb36706a4146650570e6b (diff)
downloademacs-65b6b59a8030b09d2a32ee88837a061e22751988.tar.gz
emacs-65b6b59a8030b09d2a32ee88837a061e22751988.zip
w32term.c (x_draw_glyphless_glyph_string_foreground): Fix the arg with_background for font->driver->draw.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/w32term.c15
2 files changed, 11 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2d1ed5a96fb..6128808a2a7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -16,6 +16,9 @@
16 (last_glyphless_glyph_frame, last_glyphless_glyph_face_id) 16 (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
17 (last_glyphless_glyph_merged_face_id): Make them non-static. 17 (last_glyphless_glyph_merged_face_id): Make them non-static.
18 18
19 * w32term.c (x_draw_glyphless_glyph_string_foreground): Fix
20 the arg with_background for font->driver->draw.
21
192010-10-29 Kenichi Handa <handa@m17n.org> 222010-10-29 Kenichi Handa <handa@m17n.org>
20 23
21 * w32gui.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Surround 24 * w32gui.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Surround
diff --git a/src/w32term.c b/src/w32term.c
index 49447d6eafc..a491e0941db 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1402,6 +1402,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
1402 struct glyph *glyph = s->first_glyph; 1402 struct glyph *glyph = s->first_glyph;
1403 XChar2b char2b[8]; 1403 XChar2b char2b[8];
1404 int x, i, j; 1404 int x, i, j;
1405 int with_background;
1405 1406
1406 /* If first glyph of S has a left box line, start drawing the text 1407 /* If first glyph of S has a left box line, start drawing the text
1407 of S to the right of that box line. */ 1408 of S to the right of that box line. */
@@ -1416,7 +1417,8 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
1416 SetTextAlign (s->hdc, TA_BASELINE | TA_LEFT); 1417 SetTextAlign (s->hdc, TA_BASELINE | TA_LEFT);
1417 1418
1418 s->char2b = char2b; 1419 s->char2b = char2b;
1419 1420 with_background = ! (s->for_overlaps
1421 || (s->background_filled_p && s->hl != DRAW_CURSOR));
1420 for (i = 0; i < s->nchars; i++, glyph++) 1422 for (i = 0; i < s->nchars; i++, glyph++)
1421 { 1423 {
1422 char buf[7], *str = NULL; 1424 char buf[7], *str = NULL;
@@ -1453,7 +1455,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
1453 unsigned code; 1455 unsigned code;
1454 HFONT old_font; 1456 HFONT old_font;
1455 1457
1456 old_font = SelectObject (s->hdc, FONT_HANDLE (font)); 1458 old_font = SelectObject (s->hdc, FONT_HANDLE (font));
1457 /* It is assured that all LEN characters in STR is ASCII. */ 1459 /* It is assured that all LEN characters in STR is ASCII. */
1458 for (j = 0; j < len; j++) 1460 for (j = 0; j < len; j++)
1459 { 1461 {
@@ -1463,11 +1465,11 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
1463 font->driver->draw (s, 0, upper_len, 1465 font->driver->draw (s, 0, upper_len,
1464 x + glyph->slice.glyphless.upper_xoff, 1466 x + glyph->slice.glyphless.upper_xoff,
1465 s->ybase + glyph->slice.glyphless.upper_yoff, 1467 s->ybase + glyph->slice.glyphless.upper_yoff,
1466 0); 1468 with_background);
1467 font->driver->draw (s, upper_len, len, 1469 font->driver->draw (s, upper_len, len,
1468 x + glyph->slice.glyphless.lower_xoff, 1470 x + glyph->slice.glyphless.lower_xoff,
1469 s->ybase + glyph->slice.glyphless.lower_yoff, 1471 s->ybase + glyph->slice.glyphless.lower_yoff,
1470 0); 1472 with_background);
1471 SelectObject (s->hdc, old_font); 1473 SelectObject (s->hdc, old_font);
1472 } 1474 }
1473 if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE) 1475 if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE)
@@ -2369,11 +2371,10 @@ x_draw_glyph_string (struct glyph_string *s)
2369 break; 2371 break;
2370 2372
2371 case GLYPHLESS_GLYPH: 2373 case GLYPHLESS_GLYPH:
2372 if (s->for_overlaps || (s->cmp_from > 0 2374 if (s->for_overlaps)
2373 && ! s->first_glyph->u.cmp.automatic))
2374 s->background_filled_p = 1; 2375 s->background_filled_p = 1;
2375 else 2376 else
2376 x_draw_glyph_string_background (s, 1); 2377 x_draw_glyph_string_background (s, 0);
2377 x_draw_glyphless_glyph_string_foreground (s); 2378 x_draw_glyphless_glyph_string_foreground (s);
2378 break; 2379 break;
2379 2380