aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorGlenn Morris2014-03-21 12:04:57 -0700
committerGlenn Morris2014-03-21 12:04:57 -0700
commit5671dc515946c8a27b09d060bc34345d42a8fa6e (patch)
tree54668c08879422e9c9d8c8c7a9e612d357971a49 /src/xterm.c
parent26e91130ed0611a1074d0cac5880c065f9ba69c8 (diff)
parent1e92a8a3aa7958ba699cd0430be4f23aff6c4c01 (diff)
downloademacs-5671dc515946c8a27b09d060bc34345d42a8fa6e.tar.gz
emacs-5671dc515946c8a27b09d060bc34345d42a8fa6e.zip
Merge from emacs-24; up to 2014-03-21T08:51:02Z!eliz@gnu.org
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c
index c7f56e1f1f2..31e1b9cb74f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2162,6 +2162,7 @@ static void
2162x_draw_image_relief (struct glyph_string *s) 2162x_draw_image_relief (struct glyph_string *s)
2163{ 2163{
2164 int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p; 2164 int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p;
2165 int extra_x, extra_y;
2165 XRectangle r; 2166 XRectangle r;
2166 int x = s->x; 2167 int x = s->x;
2167 int y = s->ybase - image_ascent (s->img, s->face, &s->slice); 2168 int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
@@ -2194,16 +2195,31 @@ x_draw_image_relief (struct glyph_string *s)
2194 2195
2195 x1 = x + s->slice.width - 1; 2196 x1 = x + s->slice.width - 1;
2196 y1 = y + s->slice.height - 1; 2197 y1 = y + s->slice.height - 1;
2198
2199 extra_x = extra_y = 0;
2200 if (s->face->id == TOOL_BAR_FACE_ID)
2201 {
2202 if (CONSP (Vtool_bar_button_margin)
2203 && INTEGERP (XCAR (Vtool_bar_button_margin))
2204 && INTEGERP (XCDR (Vtool_bar_button_margin)))
2205 {
2206 extra_x = XINT (XCAR (Vtool_bar_button_margin));
2207 extra_y = XINT (XCDR (Vtool_bar_button_margin));
2208 }
2209 else if (INTEGERP (Vtool_bar_button_margin))
2210 extra_x = extra_y = XINT (Vtool_bar_button_margin);
2211 }
2212
2197 top_p = bot_p = left_p = right_p = 0; 2213 top_p = bot_p = left_p = right_p = 0;
2198 2214
2199 if (s->slice.x == 0) 2215 if (s->slice.x == 0)
2200 x -= thick, left_p = 1; 2216 x -= thick + extra_x, left_p = 1;
2201 if (s->slice.y == 0) 2217 if (s->slice.y == 0)
2202 y -= thick, top_p = 1; 2218 y -= thick + extra_y, top_p = 1;
2203 if (s->slice.x + s->slice.width == s->img->width) 2219 if (s->slice.x + s->slice.width == s->img->width)
2204 x1 += thick, right_p = 1; 2220 x1 += thick + extra_x, right_p = 1;
2205 if (s->slice.y + s->slice.height == s->img->height) 2221 if (s->slice.y + s->slice.height == s->img->height)
2206 y1 += thick, bot_p = 1; 2222 y1 += thick + extra_y, bot_p = 1;
2207 2223
2208 x_setup_relief_colors (s); 2224 x_setup_relief_colors (s);
2209 get_glyph_string_clip_rect (s, &r); 2225 get_glyph_string_clip_rect (s, &r);