# HG changeset patch # User Kenichi Handa # Date 1189681340 0 # Node ID 3cb16c370b5853f30f95af9ef6a69739af00e608 # Parent b1f535db3dcaf6066eb5f4dee20241e5604292b6 (x_set_glyph_string_clipping): Use get_glyph_string_clip_rects. (x_set_glyph_string_clipping_exactly): Adjusted for the change fo struct glyph_string. (x_draw_glyph_string): Likewise. diff -r b1f535db3dca -r 3cb16c370b58 src/xterm.c --- a/src/xterm.c Thu Sep 13 10:50:51 2007 +0000 +++ b/src/xterm.c Thu Sep 13 11:02:20 2007 +0000 @@ -1228,13 +1228,18 @@ x_set_glyph_string_clipping (s) struct glyph_string *s; { - XRectangle r; - get_glyph_string_clip_rect (s, &r); - XSetClipRectangles (s->display, s->gc, 0, 0, &r, 1, Unsorted); #ifdef USE_FONT_BACKEND - s->clip_x = r.x, s->clip_y = r.y; - s->clip_width = r.width, s->clip_height = r.height; -#endif /* USE_FONT_BACKEND */ + XRectangle *r = s->clip; +#else + XRectangle r[2]; +#endif + int n = get_glyph_string_clip_rects (s, r, 2); + + if (n > 0) + XSetClipRectangles (s->display, s->gc, 0, 0, r, n, Unsorted); +#ifdef USE_FONT_BACKEND + s->num_clips = n; +#endif } @@ -1251,10 +1256,12 @@ #ifdef USE_FONT_BACKEND if (enable_font_backend) { - r.x = dst->clip_x = src->x; - r.width = dst->clip_width = src->width; - r.y = dst->clip_y = src->y; - r.height = dst->clip_height = src->height; + r.x = src->x; + r.width = src->width; + r.y = src->y; + r.height = src->height; + dst->clip[0] = r; + dst->num_clips = 1; } else { @@ -2839,7 +2846,7 @@ x_set_glyph_string_clipping (next); x_draw_glyph_string_background (next, 1); #ifdef USE_FONT_BACKEND - next->clip_width = 0; + next->num_clips = 0; #endif /* USE_FONT_BACKEND */ } } @@ -3028,7 +3035,7 @@ XSetClipMask (prev->display, prev->gc, None); prev->hl = save; #ifdef USE_FONT_BACKEND - prev->clip_width = 0; + prev->num_clips = 0; #endif /* USE_FONT_BACKEND */ } } @@ -3055,7 +3062,7 @@ XSetClipMask (next->display, next->gc, None); next->hl = save; #ifdef USE_FONT_BACKEND - next->clip_width = 0; + next->num_clips = 0; #endif /* USE_FONT_BACKEND */ } } @@ -3064,7 +3071,7 @@ /* Reset clipping. */ XSetClipMask (s->display, s->gc, None); #ifdef USE_FONT_BACKEND - s->clip_width = 0; + s->num_clips = 0; #endif /* USE_FONT_BACKEND */ }