Mercurial > emacs
comparison src/xterm.c @ 25079:3a09aae52441
(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.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 26 Jul 1999 21:23:07 +0000 |
parents | 0d081383b5b8 |
children | d3b7d7d2bca8 |
comparison
equal
deleted
inserted
replaced
25078:6de9d21f8a24 | 25079:3a09aae52441 |
---|---|
2362 XRectangle *r; | 2362 XRectangle *r; |
2363 { | 2363 { |
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 } |
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); | |
2377 | 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) |
2381 r->height = s->row->visible_height; | 2386 r->height = s->row->visible_height; |
3229 | 3234 |
3230 width = s->face->box_line_width; | 3235 width = s->face->box_line_width; |
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; |
3238 | 3243 |
3239 left_p = (s->first_glyph->left_box_line_p | 3244 left_p = (s->first_glyph->left_box_line_p |
4017 | 4022 |
4018 /* If S extends its face to the end of the line, set its | 4023 /* If S extends its face to the end of the line, set its |
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 } |
4026 | 4031 |
4027 | 4032 |
4261 x -= width; | 4266 x -= width; |
4262 } | 4267 } |
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 |
4273 { | 4278 { |
4274 x = WINDOW_AREA_TO_FRAME_PIXEL_X (w, area, x); | 4279 x = WINDOW_AREA_TO_FRAME_PIXEL_X (w, area, x); |