--- rxvt-unicode/src/screen.C 2004/01/31 00:20:21 1.21 +++ rxvt-unicode/src/screen.C 2004/01/31 02:31:17 1.23 @@ -1873,10 +1873,10 @@ refresh_type &= ~REFRESH_BOUNDS; } -#if defined(XPM_BACKGROUND) +#ifdef XPM_BACKGROUND must_clear |= (bgPixmap.pixmap != None); #endif -#if defined(TRANSPARENT) +#ifdef TRANSPARENT must_clear |= ((Options & Opt_transparent) && am_transparent); #endif ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ @@ -2164,19 +2164,22 @@ */ rxvt_font *font = (*TermWin.fontset)[fid]; - if (back == Color_bg) + if (back == fore) + font->clear_rect (xpixel, ypixel, + TermWin.fwidth * count, TermWin.fheight, + back); + else if (back == Color_bg) { if (must_clear) { + CLEAR_CHARS (xpixel, ypixel, count); + for (i = 0; i < count; i++) /* don't draw empty strings */ if (text[i] != ' ') { font->draw (xpixel, ypixel, text, count, fore, -1); - goto nodraw; + break; } - - CLEAR_CHARS (xpixel, ypixel, count); -nodraw: ; } else font->draw (xpixel, ypixel, text, count, fore, Color_bg);