]> git.eshelyaron.com Git - emacs.git/commitdiff
Draw relief (if any) before
authorAndrew Innes <andrewi@gnu.org>
Tue, 14 Aug 2001 11:46:33 +0000 (11:46 +0000)
committerAndrew Innes <andrewi@gnu.org>
Tue, 14 Aug 2001 11:46:33 +0000 (11:46 +0000)
drawing glyph string.

src/ChangeLog
src/w32term.c

index 1d8a3bd1269761a79ee09b412b63dcc904627f32..c6d75ebab316a99af90a91f3af6bdff830f2961c 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-14  Andrew Innes  <andrewi@gnu.org>
+
+       * w32term.c (x_draw_glyph_string): Draw relief (if any) before
+       drawing glyph string.
+
 2001-08-14  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * s/hiuxwe2.h: New file, for the HITACHI SR2001/SR2201 series
index 085d1e2e898f1577a804ed79e303691f4fd71c93..372c702ecf312335c3005fca2281c5a2a078c18b 100644 (file)
@@ -4300,6 +4300,8 @@ static void
 x_draw_glyph_string (s)
      struct glyph_string *s;
 {
+  int relief_drawn_p = 0;
+
   /* If S draws into the background of its successor, draw the
      background of the successor first so that S can draw into it.
      This makes S->next use XDrawString instead of XDrawImageString.  */
@@ -4315,6 +4317,19 @@ x_draw_glyph_string (s)
   x_set_glyph_string_gc (s);
   x_set_glyph_string_clipping (s);
 
+  /* Draw relief (if any) in advance for char/composition so that the
+     glyph string can be drawn over it.  */
+  if (!s->for_overlaps_p
+      && s->face->box != FACE_NO_BOX
+      && (s->first_glyph->type == CHAR_GLYPH
+         || s->first_glyph->type == COMPOSITE_GLYPH))
+
+    {
+      x_draw_glyph_string_background (s, 1);
+      x_draw_glyph_string_box (s);
+      relief_drawn_p = 1;
+    }
+
   switch (s->first_glyph->type)
     {
     case IMAGE_GLYPH:
@@ -4403,7 +4418,7 @@ x_draw_glyph_string (s)
         }
 
       /* Draw relief.  */
-      if (s->face->box != FACE_NO_BOX)
+      if (!relief_drawn_p && s->face->box != FACE_NO_BOX)
         x_draw_glyph_string_box (s);
     }