From 8924eef8720805266506e33d18997b0cdee5e064 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 23 Jan 2008 05:59:29 +0000 Subject: [PATCH] *** empty log message *** --- src/rxvtfont.C | 4 ++-- src/rxvttoolkit.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/rxvtfont.C b/src/rxvtfont.C index feada77a..07bfc570 100644 --- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -1401,8 +1401,8 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y, } #endif - if (!back_rendered) - XftDrawRect (d2, &term->pix_colors[bg < 0 ? Color_bg : bg].c, 0, 0, w, h); + 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); XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); diff --git a/src/rxvttoolkit.h b/src/rxvttoolkit.h index 9abfeda3..487ded42 100644 --- a/src/rxvttoolkit.h +++ b/src/rxvttoolkit.h @@ -331,6 +331,16 @@ struct rxvt_color bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); } bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); } + bool is_opaque () const + { +#if XFT + //TODO: only supports 24 bit truecolour + return c.color.alpha < 0xff00; +#else + return 1; +#endif + } + bool alloc (rxvt_screen *screen, const rgba &color); void free (rxvt_screen *screen); -- 2.34.1