diff options
| author | YAMAMOTO Mitsuharu | 2014-03-28 09:50:53 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2014-03-28 09:50:53 +0900 |
| commit | 08be62f4b1c28ef05c82bce3fad43c99ba7735bc (patch) | |
| tree | f4ef0d24381575089d1bc9de1a4830763e03fd00 /src | |
| parent | 0c4e715c98919593413a76a0ab1458b0d10ea287 (diff) | |
| download | emacs-08be62f4b1c28ef05c82bce3fad43c99ba7735bc.tar.gz emacs-08be62f4b1c28ef05c82bce3fad43c99ba7735bc.zip | |
Adjust image background width on X11 accordingly when its x position is adjusted. (Bug#17115)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0c24451c459..a0f46f028c8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * xterm.c (x_draw_image_glyph_string): Adjust image background | ||
| 4 | width accordingly when its x position is adjusted. (Bug#17115) | ||
| 5 | |||
| 1 | 2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 6 | 2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 7 | ||
| 3 | * w32term.c (x_draw_image_glyph_string): Fix computation of height | 8 | * w32term.c (x_draw_image_glyph_string): Fix computation of height |
diff --git a/src/xterm.c b/src/xterm.c index fc61fb248ef..6fea807c975 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2402,15 +2402,19 @@ x_draw_image_glyph_string (struct glyph_string *s) | |||
| 2402 | { | 2402 | { |
| 2403 | int x = s->x; | 2403 | int x = s->x; |
| 2404 | int y = s->y; | 2404 | int y = s->y; |
| 2405 | int width = s->background_width; | ||
| 2405 | 2406 | ||
| 2406 | if (s->first_glyph->left_box_line_p | 2407 | if (s->first_glyph->left_box_line_p |
| 2407 | && s->slice.x == 0) | 2408 | && s->slice.x == 0) |
| 2408 | x += box_line_hwidth; | 2409 | { |
| 2410 | x += box_line_hwidth; | ||
| 2411 | width -= box_line_hwidth; | ||
| 2412 | } | ||
| 2409 | 2413 | ||
| 2410 | if (s->slice.y == 0) | 2414 | if (s->slice.y == 0) |
| 2411 | y += box_line_vwidth; | 2415 | y += box_line_vwidth; |
| 2412 | 2416 | ||
| 2413 | x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); | 2417 | x_draw_glyph_string_bg_rect (s, x, y, width, height); |
| 2414 | } | 2418 | } |
| 2415 | 2419 | ||
| 2416 | s->background_filled_p = 1; | 2420 | s->background_filled_p = 1; |