aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xftfont.c13
1 files 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)
512 FRAME_X_WINDOW (f), 512 FRAME_X_WINDOW (f),
513 FRAME_X_VISUAL (f), 513 FRAME_X_VISUAL (f),
514 FRAME_X_COLORMAP (f)); 514 FRAME_X_COLORMAP (f));
515 if (s->clip_width) 515 if (s->num_clips > 0)
516 { 516 XftDrawSetClipRectangles (xft_draw, 0, 0, s->clip, s->num_clips);
517 r.x = s->clip_x, r.width = s->clip_width; 517 else
518 r.y = s->clip_y, r.height = s->clip_height; 518 XftDrawSetClip (xft_draw, NULL);
519 XftDrawSetClipRectangles (xft_draw, 0, 0, &r, 1); 519
520 }
521 if (with_background) 520 if (with_background)
522 { 521 {
523 struct font *font = (struct font *) face->font_info; 522 struct font *font = (struct font *) face->font_info;
@@ -532,8 +531,6 @@ xftfont_draw (s, from, to, x, y, with_background)
532 531
533 XftDrawGlyphs (xft_draw, &fg, xftfont_info->xftfont, 532 XftDrawGlyphs (xft_draw, &fg, xftfont_info->xftfont,
534 x, y, code, len); 533 x, y, code, len);
535 if (s->clip_width)
536 XftDrawSetClip (xft_draw, NULL);
537 if (s->font_info != face->font_info) 534 if (s->font_info != face->font_info)
538 XftDrawDestroy (xft_draw); 535 XftDrawDestroy (xft_draw);
539 UNBLOCK_INPUT; 536 UNBLOCK_INPUT;