diff options
| author | Gerd Moellmann | 1999-07-26 21:23:07 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-07-26 21:23:07 +0000 |
| commit | 1da3fd719ece6252091bc375b384a910ff0da573 (patch) | |
| tree | 2dce4b8c9af469449efdc5f18235e15d76e9e400 | |
| parent | 203ae5607eaa362c1501a6c0d0ddc21da6f61bce (diff) | |
| download | emacs-1da3fd719ece6252091bc375b384a910ff0da573.tar.gz emacs-1da3fd719ece6252091bc375b384a910ff0da573.zip | |
(x_get_glyph_string_clip_rect): Take internal border
into account for full-width windows. Don't add scroll bar width
to width of clip rect.
(x_draw_glyph_string_box): Add 1 to right x of full width lines.
(x_set_glyph_string_background_width): Add 1 to background width.
(x_draw_glyphs): Take internal border into account for full-width
lines.
| -rw-r--r-- | src/xterm.c | 21 |
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 |