repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: c901870f5ab80e369865d0a57759e1836d571c96:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit c901870f5ab80e369865d0a57759e1836d571c96
Author: Marc Lehmann 
Date:   Thu Nov 2 17:23:50 2006 +0000

    *** empty log message ***

diff --git a/Changes b/Changes
index 5a8bc875149b70fd8e98a8dd8711c31336a4dbef..
index ..973b0928df528efa064934377a37fadbcc3a84b0 100644
--- a/Changes
+++ b/Changes
@@ -20,7 +20,6 @@ WISH: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the
 WISH: kick out xpm.C, replace by pixbuf
 DUMB: support tex fonts

-TODO: clear_rect -1 transparency breaks -ip
 8.0
 	- combining characters cleared the area instead of creating an overlay,
           thus losing the ability to draw combining characters properly in most
diff --git a/src/rxvt.h b/src/rxvt.h
index fc21f0f961e0cc1d83db28f76607a54cb4b65064..
index ..bb5e26b341d9d1370e46d34e0659121de10a0fbd 100644
--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -522,6 +522,8 @@ enum {
  */

 enum colour_list {
+  Color_none = -2,
+  Color_transparent = -1,
   Color_fg = 0,
   Color_bg,
   minCOLOR,                   /* 2 */
diff --git a/src/rxvtfont.C b/src/rxvtfont.C
index fd133d3fbe7da08ba142c6bff5446087a998a36e..
index ..ca8d0d7bd437b88365e8f13cf6b3084c4d13feb2 100644
--- a/src/rxvtfont.C
+++ b/src/rxvtfont.C
@@ -234,7 +234,7 @@ rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color)
   dTermDisplay;
   dTermGC;

-  if (color == Color_bg)
+  if (color == Color_bg || color == Color_transparent)
     XClearArea (disp, d, x, y, w, h, false);
   else if (color >= 0)
     {
@@ -443,7 +443,7 @@ rxvt_font_default::draw (rxvt_drawable &d, int x, int y,
                                 ? f1
                                 : (*fs)[fs->find_font (cc->c2)];

-              f2->draw (d, x, y, chrs, width, fg, -1);
+              f2->draw (d, x, y, chrs, width, fg, Color_none);
             }
         }
 #endif
diff --git a/src/screen.C b/src/screen.C
index 28089c0fc4363a157e9244ca2630a12e20b22bfc..
index ..77b993575bac515382f42e4672b79cefecf90f1e 100644
--- a/src/screen.C
+++ b/src/screen.C
@@ -2351,14 +2351,14 @@ rxvt_term::scr_refresh () NOTHROW
            */
           rxvt_font *font = (*fontset[GET_STYLE (rend)])[GET_FONT (rend)];

-          if (back == Color_bg && have_bg)
+          if (have_bg && back == Color_bg)
             {
               // this is very ugly, maybe push it into ->draw?

               for (i = 0; i < count; i++) /* don't draw empty strings */
                 if (text[i] != ' ')
                   {
-                    font->draw (*drawable, xpixel, ypixel, text, count, fore, -1);
+                    font->draw (*drawable, xpixel, ypixel, text, count, fore, Color_transparent);
                     goto did_clear;
                   }

-----END OF PAGE-----