--- rxvt-unicode/src/rxvtfont.C 2008/01/23 14:18:19 1.140 +++ rxvt-unicode/src/rxvtfont.C 2008/01/26 15:07:32 1.148 @@ -1,7 +1,7 @@ /*----------------------------------------------------------------------* * File: rxvtfont.C *----------------------------------------------------------------------* - * Copyright (c) 2003-2006 Marc Lehmann + * Copyright (c) 2003-2008 Marc Lehmann * - original version. * * This program is free software; you can redistribute it and/or modify @@ -1298,15 +1298,8 @@ int w = term->fwidth * len; int h = term->fheight; - /* - * Maybe make buffering into a resource flag? Compile time option doesn't seems like a - * good idea from the perspective of packaging for wide variety of user configs. - */ - bool buffered = bg >= Color_transparent; -#ifdef FORCE_UNBUFFERED_XFT - buffered = false; -#endif - buffered=false;//D + bool buffered = bg >= Color_transparent + && term->option (Opt_buffered); // cut trailing spaces while (len && text [len - 1] == ' ') @@ -1348,7 +1341,7 @@ rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); #ifdef HAVE_BG_PIXMAP - Picture dst = 0; + Picture dst = 0; // the only assignment is done conditionally in the following if condition if (term->bgPixmap.pixmap && (bg == Color_transparent || bg == Color_bg @@ -1391,12 +1384,13 @@ { Picture solid_color_pict = XftDrawSrcPicture (d2, &term->pix_colors[bg].c); + // dst can only be set when bg >= 0 XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, 0, 0, w, h); } } else #endif - clear_rect (d, x, y, w, h, bg); + XftDrawRect (d2, &term->pix_colors[bg >= 0 ? bg : Color_bg].c, 0, 0, w, h); XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y);