From 03d198e8b9675c4120d28e27d7e7d9d349b51a88 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 13 Sep 2007 11:04:11 +0000 Subject: [PATCH] (xftfont_draw): Adjusted for the change of struct glyph_string. --- src/xftfont.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/xftfont.c b/src/xftfont.c index 4c7582ed041..75cc06117c4 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -512,12 +512,11 @@ xftfont_draw (s, from, to, x, y, with_background) FRAME_X_WINDOW (f), FRAME_X_VISUAL (f), FRAME_X_COLORMAP (f)); - if (s->clip_width) - { - r.x = s->clip_x, r.width = s->clip_width; - r.y = s->clip_y, r.height = s->clip_height; - XftDrawSetClipRectangles (xft_draw, 0, 0, &r, 1); - } + if (s->num_clips > 0) + XftDrawSetClipRectangles (xft_draw, 0, 0, s->clip, s->num_clips); + else + XftDrawSetClip (xft_draw, NULL); + if (with_background) { struct font *font = (struct font *) face->font_info; @@ -532,8 +531,6 @@ xftfont_draw (s, from, to, x, y, with_background) XftDrawGlyphs (xft_draw, &fg, xftfont_info->xftfont, x, y, code, len); - if (s->clip_width) - XftDrawSetClip (xft_draw, NULL); if (s->font_info != face->font_info) XftDrawDestroy (xft_draw); UNBLOCK_INPUT; -- 2.39.5