*** empty log message ***
authorroot <root>
Wed, 23 Jan 2008 05:59:29 +0000 (05:59 +0000)
committerroot <root>
Wed, 23 Jan 2008 05:59:29 +0000 (05:59 +0000)
src/rxvtfont.C
src/rxvttoolkit.h

index feada77..07bfc57 100644 (file)
@@ -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);
index 9abfeda..487ded4 100644 (file)
@@ -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);