sasha broke it, which is fortunate, meaning it wasn't broken for too long
authorroot <root>
Wed, 23 Jan 2008 05:14:10 +0000 (05:14 +0000)
committerroot <root>
Wed, 23 Jan 2008 05:14:10 +0000 (05:14 +0000)
Changes
src/rxvtfont.C

diff --git a/Changes b/Changes
index 66caf561ba6a2de4fea62191c867e6f99efcd31a..ddad230ac7b7a663db9f5c3de530a6e8c1964b6f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -22,9 +22,12 @@ DUMB: support tex fonts
           with wrong arguments (I wish debian maintainers in general would
           report bugs and their proposed fixes to the original package maintaienrs
           instead of sitting on them for good measure to see if anybody notices).
+        - drawing xft compose characters was causing garbage to be drawn.
+        - correctly clear xft character background in all cases.
        - implement bracketed paste mode (xterm private mode 2004).
         - check for refresh after initialising to avoid staying blank
           till the first event arrives. or so.
+        - the FORCE_UNBUFFERED_XFT feature macro works again.
        - continuously update transparency while moving/resizing now.
        - OSC 39/49 are deprecated and aliased to OSC 10/11.
         - cub1 now acts as advertised (and ignores the "wrapped" state).
index 9aaaef83bce5668b96139e261b002ee4fa8372ad..3f1719ce8a32e450d1c9faf077e01dbaf8e3e002 100644 (file)
@@ -1298,15 +1298,15 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
   int w = term->fwidth * len;
   int h = term->fheight;
 
-  /* TODO: this logic needs some more thinking, since we no longer do pseudo-transparency.
+  /*
    * Maybe make buffering into a resource flag? Compile time option doesn't seems like a
    * good idea from the perspective of packaging for wide variety of user configs.
    */
-  bool buffered = true
+  bool buffered = bg >= 0;
 #ifdef FORCE_UNBUFFERED_XFT
-                  && bg >= 0
+  buffered = false;
 #endif
-                  ;
+
   // cut trailing spaces
   while (len && text [len - 1] == ' ')
     len--;
@@ -1342,9 +1342,9 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
 
   if (buffered)
     {
-      bool back_rendered = false;
       if (ep != enc)
         {
+          bool back_rendered = false;
           rxvt_drawable &d2 = d.screen->scratch_drawable (w, h);
 
 #ifdef HAVE_BG_PIXMAP
@@ -1352,7 +1352,7 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
             {
               Picture dst = 0;
 
-              if (bg >= 0 && term->pix_colors[bg].c.color.alpha < 0x0ff00)
+              if (bg >= 0 && term->pix_colors[bg].c.color.alpha < 0xff00)
                 dst = XftDrawPicture (d2);
 
               if (bg < 0 || dst != 0)
@@ -1401,7 +1401,7 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
             }
 #endif
 
-          if (bg >= 0 && !back_rendered)
+          if (!back_rendered)
             XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h);
 
           XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc);