aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 3cab4ec4ba7..8e4ed0407ac 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2364,17 +2364,22 @@ x_get_glyph_string_clip_rect (s, r)
2364 if (s->row->full_width_p) 2364 if (s->row->full_width_p)
2365 { 2365 {
2366 /* Draw full-width. X coordinates are relative to S->w->left. */ 2366 /* Draw full-width. X coordinates are relative to S->w->left. */
2367 r->x = WINDOW_LEFT_MARGIN (s->w) * CANON_X_UNIT (s->f); 2367 int canon_x = CANON_X_UNIT (s->f);
2368 r->width = XFASTINT (s->w->width) * CANON_X_UNIT (s->f); 2368
2369 r->x = WINDOW_LEFT_MARGIN (s->w) * canon_x;
2370 r->width = XFASTINT (s->w->width) * canon_x;
2369 2371
2370 if (FRAME_HAS_VERTICAL_SCROLL_BARS (s->f)) 2372 if (FRAME_HAS_VERTICAL_SCROLL_BARS (s->f))
2371 { 2373 {
2372 int width = FRAME_SCROLL_BAR_WIDTH (s->f) * CANON_X_UNIT (s->f); 2374 int width = FRAME_SCROLL_BAR_WIDTH (s->f) * canon_x;
2373 r->width += width;
2374 if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (s->f)) 2375 if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (s->f))
2375 r->x -= width; 2376 r->x -= width;
2376 } 2377 }
2377 2378
2379 /* If row should not extend over internal borders, adjust x. */
2380 if (!s->row->internal_border_p)
2381 r->x += FRAME_INTERNAL_BORDER_WIDTH (s->f);
2382
2378 /* Unless displaying a mode or menu bar line, which are always 2383 /* Unless displaying a mode or menu bar line, which are always
2379 fully visible, clip to the visible part of the row. */ 2384 fully visible, clip to the visible part of the row. */
2380 if (s->w->pseudo_window_p) 2385 if (s->w->pseudo_window_p)
@@ -3231,7 +3236,7 @@ x_draw_glyph_string_box (s)
3231 raised_p = s->face->box == FACE_RAISED_BOX; 3236 raised_p = s->face->box == FACE_RAISED_BOX;
3232 left_x = s->x; 3237 left_x = s->x;
3233 right_x = ((s->row->full_width_p 3238 right_x = ((s->row->full_width_p
3234 ? last_x 3239 ? last_x - 1
3235 : min (last_x, s->x + s->width) - 1)); 3240 : min (last_x, s->x + s->width) - 1));
3236 top_y = s->y; 3241 top_y = s->y;
3237 bottom_y = top_y + s->height - 1; 3242 bottom_y = top_y + s->height - 1;
@@ -4019,7 +4024,7 @@ x_set_glyph_string_background_width (s, start, last_x)
4019 background_width to the distance to the right edge of the drawing 4024 background_width to the distance to the right edge of the drawing
4020 area. */ 4025 area. */
4021 if (s->extends_to_end_of_line_p) 4026 if (s->extends_to_end_of_line_p)
4022 s->background_width = last_x - s->x; 4027 s->background_width = last_x - s->x + 1;
4023 else 4028 else
4024 s->background_width = s->width; 4029 s->background_width = s->width;
4025} 4030}
@@ -4263,10 +4268,10 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end)
4263 4268
4264 /* If row should extend over internal borders, adjust x and 4269 /* If row should extend over internal borders, adjust x and
4265 width accordingly. */ 4270 width accordingly. */
4266 if (row->internal_border_p) 4271 if (!row->internal_border_p)
4267 { 4272 {
4268 x += FRAME_INTERNAL_BORDER_WIDTH (f); 4273 x += FRAME_INTERNAL_BORDER_WIDTH (f);
4269 width -= 2 * FRAME_INTERNAL_BORDER_WIDTH (f); 4274 last_x -= FRAME_INTERNAL_BORDER_WIDTH (f);
4270 } 4275 }
4271 } 4276 }
4272 else 4277 else