--- rxvt-unicode/src/rxvtfont.C 2007/08/28 17:32:25 1.114 +++ rxvt-unicode/src/rxvtfont.C 2007/09/12 19:51:41 1.118 @@ -1327,17 +1327,25 @@ if (term->bgPixmap.pixmap) { Picture dst = 0; + if (bg >= 0 && term->pix_colors[bg].c.color.alpha < 0x0ff00) - dst = XftDrawPicture(d2); + dst = XftDrawPicture (d2); if (bg < 0 || dst != 0) { - if (term->bgPixmap.pmap_width >= x + term->window_vt_x+w - && term->bgPixmap.pmap_height >= y + term->window_vt_y+h) + int src_x = x, src_y = y ; + + if (term->bgPixmap.is_parentOrigin ()) + { + src_x += term->window_vt_x; + src_y += term->window_vt_y; + } + + if (term->bgPixmap.pmap_width >= src_x+w + && term->bgPixmap.pmap_height >= src_y+h) { XCopyArea (disp, term->bgPixmap.pixmap, d2, gc, - x + term->window_vt_x, y + term->window_vt_y, - w, h, 0, 0); + src_x, src_y, w, h, 0, 0); } else { @@ -1345,8 +1353,8 @@ gcv.fill_style = FillTiled; gcv.tile = term->bgPixmap.pixmap; - gcv.ts_x_origin = -x; - gcv.ts_y_origin = -y; + gcv.ts_x_origin = -src_x; + gcv.ts_y_origin = -src_y; XChangeGC (disp, gc, GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle, @@ -1369,7 +1377,7 @@ } #endif - if(bg >= 0 && !back_rendered) + if (bg >= 0 && !back_rendered) XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h); XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc);