]> git.eshelyaron.com Git - emacs.git/commitdiff
w32term.c (x_draw_glyphless_glyph_string_foreground): Fix the arg with_background...
authorKenichi Handa <handa@m17n.org>
Mon, 1 Nov 2010 07:35:04 +0000 (16:35 +0900)
committerKenichi Handa <handa@m17n.org>
Mon, 1 Nov 2010 07:35:04 +0000 (16:35 +0900)
src/ChangeLog
src/w32term.c

index 2d1ed5a96fb6385a583953b9856eb1cc454f3777..6128808a2a75fd3eb7909bc0fdf523b2defb6df4 100644 (file)
@@ -16,6 +16,9 @@
        (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
        (last_glyphless_glyph_merged_face_id): Make them non-static.
 
+       * w32term.c (x_draw_glyphless_glyph_string_foreground): Fix
+       the arg with_background for font->driver->draw.
+
 2010-10-29  Kenichi Handa  <handa@m17n.org>
 
        * w32gui.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Surround
index 49447d6eafc2ad54cff601593bdd9cfa8db1ff74..a491e0941db3a9ab2975e0cc3d496ac8ed90bd49 100644 (file)
@@ -1402,6 +1402,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
   struct glyph *glyph = s->first_glyph;
   XChar2b char2b[8];
   int x, i, j;
+  int with_background;
 
   /* If first glyph of S has a left box line, start drawing the text
      of S to the right of that box line.  */
@@ -1416,7 +1417,8 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
   SetTextAlign (s->hdc, TA_BASELINE | TA_LEFT);
 
   s->char2b = char2b;
-
+  with_background = ! (s->for_overlaps
+                      || (s->background_filled_p && s->hl != DRAW_CURSOR));
   for (i = 0; i < s->nchars; i++, glyph++)
     {
       char buf[7], *str = NULL;
@@ -1453,7 +1455,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
          unsigned code;
          HFONT old_font;
 
-         old_font =  SelectObject (s->hdc, FONT_HANDLE (font));
+         old_font = SelectObject (s->hdc, FONT_HANDLE (font));
          /* It is assured that all LEN characters in STR is ASCII.  */
          for (j = 0; j < len; j++)
            {
@@ -1463,11 +1465,11 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
          font->driver->draw (s, 0, upper_len,
                              x + glyph->slice.glyphless.upper_xoff,
                              s->ybase + glyph->slice.glyphless.upper_yoff,
-                             0);
+                             with_background);
          font->driver->draw (s, upper_len, len,
                              x + glyph->slice.glyphless.lower_xoff,
                              s->ybase + glyph->slice.glyphless.lower_yoff,
-                             0);
+                             with_background);
          SelectObject (s->hdc, old_font);
        }
       if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE)
@@ -2369,11 +2371,10 @@ x_draw_glyph_string (struct glyph_string *s)
       break;
 
     case GLYPHLESS_GLYPH:
-      if (s->for_overlaps || (s->cmp_from > 0
-                             && ! s->first_glyph->u.cmp.automatic))
+      if (s->for_overlaps)
        s->background_filled_p = 1;
       else
-       x_draw_glyph_string_background (s, 1);
+       x_draw_glyph_string_background (s, 0);
       x_draw_glyphless_glyph_string_foreground (s);
       break;