From 2de6252620b00c74aa21d6601bebffdc9e3621b5 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 23 Jan 2008 14:09:21 +0000 Subject: [PATCH] improve transparency without render a bit again --- src/rxvtfont.C | 3 ++- src/rxvttoolkit.C | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rxvtfont.C b/src/rxvtfont.C index ee7c443e..5abee98d 100644 --- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -1306,6 +1306,7 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y, #ifdef FORCE_UNBUFFERED_XFT buffered = false; #endif + buffered=false;//D // cut trailing spaces while (len && text [len - 1] == ' ') @@ -1395,7 +1396,7 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y, } else #endif - XftDrawRect (d2, &term->pix_colors[bg < 0 ? Color_bg : bg].c, 0, 0, w, h); + XftDrawRect (d2, &term->pix_colors[bg == Color_transparent ? Color_bg : 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); diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C index da7e2a94..0a26f2a2 100644 --- a/src/rxvttoolkit.C +++ b/src/rxvttoolkit.C @@ -675,7 +675,7 @@ insert_component (unsigned int value, unsigned int mask, unsigned int shift) bool rxvt_color::alloc (rxvt_screen *screen, const rgba &color) { - //TODO: only supports 24 bit truecolour + //TODO: only supports 24 bit int alpha = color.a >= 0xff00 ? 0xffff : color.a; #if XFT -- 2.34.1