]> git.eshelyaron.com Git - emacs.git/commitdiff
Adjust image background width on X11 accordingly when its x position is adjusted...
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 28 Mar 2014 00:50:53 +0000 (09:50 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 28 Mar 2014 00:50:53 +0000 (09:50 +0900)
src/ChangeLog
src/xterm.c

index 0c24451c459063406f22a94957d4c4c93c4e026e..a0f46f028c8413101dbd0bbdb0b4ea4b8e25337b 100644 (file)
@@ -1,3 +1,8 @@
+2014-03-28  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * xterm.c (x_draw_image_glyph_string): Adjust image background
+       width accordingly when its x position is adjusted.  (Bug#17115)
+
 2014-03-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * w32term.c (x_draw_image_glyph_string): Fix computation of height
index fc61fb248ef8bf9e63f4881e836d6051754ef199..6fea807c97525391708438a3cd7094c36b356c2c 100644 (file)
@@ -2402,15 +2402,19 @@ x_draw_image_glyph_string (struct glyph_string *s)
        {
          int x = s->x;
          int y = s->y;
+         int width = s->background_width;
 
          if (s->first_glyph->left_box_line_p
              && s->slice.x == 0)
-           x += box_line_hwidth;
+           {
+             x += box_line_hwidth;
+             width -= box_line_hwidth;
+           }
 
          if (s->slice.y == 0)
            y += box_line_vwidth;
 
-         x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height);
+         x_draw_glyph_string_bg_rect (s, x, y, width, height);
        }
 
       s->background_filled_p = 1;