*** empty log message ***
authorroot <root>
Wed, 5 Jul 2006 19:22:15 +0000 (19:22 +0000)
committerroot <root>
Wed, 5 Jul 2006 19:22:15 +0000 (19:22 +0000)
Changes
src/rxvttoolkit.C

diff --git a/Changes b/Changes
index 7463f948342199d210bfbfe689bf88b88f7e026d..284f4eee1dba44c863d21e64edb733d2fc1c36f6 100644 (file)
--- a/Changes
+++ b/Changes
@@ -19,8 +19,7 @@ WISH: anyevent mouse notification / manage MotionMask better.
 WISH: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look.
 DUMB: support tex fonts
 
-TODO: rxvt -bg "#262626" -fn "xft:Andale Mono:pixelsize=15"
-      # causes some lines with #252525 in the output. rounding bug in xft?
+TODO: investigate -pe tabbed -g 80x25 being 23 not 24 or 25 lines
 TODO: zero scorllback buffer should free memory
 TODO: kuake
 TODO: depth resource not working(?)
@@ -28,6 +27,8 @@ TODO: fix the flaw in the url regex jost pointed out
 TODO: look into the selection hilight patch
 TODO: implement smartcase-like search in searchable-scrollback
 TODO: check wether -depth works as resource
+TODO: digital clock gets nuked after searching
+TODO: read .Xdefaults even when we have display resources, but give them lower priority
        - add FORCE_UNBUFFERED_XFT define to features.h.
         - double-buffered xft drawing did suffer from pixel offset issues
           when pixmap transparency was enabled.
@@ -47,6 +48,8 @@ TODO: check wether -depth works as resource
         - slap in a using namespace std, might help on platforms that don't
           follow C++ closely enough.
         - fix mailto url regex, spotted within milliseconds by Jost Krieger.
+        - use less "correct" color scaling that is compatible with libX11 and Xft
+          (avoids off-by-one colors resulting in striped backgrounds).
 
 7.7  Tue Feb 21 12:32:49 CET 2006
        - use double-buffered drawing (xft fonts only). On many driver/hardware
index 4db0eb19cec2e246ba79e51593015d5b0b494273..102b69bfe775e9f56b7dfb6a85b6b270db863f4a 100644 (file)
@@ -1,4 +1,4 @@
-/*--------------------------------*-C-*---------------------------------*
+/*----------------------------------------------------------------------*
  * File:       rxvttoolkit.C
  *----------------------------------------------------------------------*
  *
@@ -651,6 +651,13 @@ template class refcache<rxvt_display>;
 refcache<rxvt_display> displays;
 
 /////////////////////////////////////////////////////////////////////////////
+//
+
+static unsigned int
+insert_component (unsigned int value, unsigned int mask, unsigned int shift)
+{
+  return (value * (mask + 1) >> 16) << shift;
+}
  
 bool
 rxvt_color::alloc (rxvt_screen *screen, const rgba &color)
@@ -670,10 +677,10 @@ rxvt_color::alloc (rxvt_screen *screen, const rgba &color)
       c.color.blue  = color.b;
       c.color.alpha = color.a;
 
-      c.pixel = ((color.r * format->direct.redMask   / rgba::MAX_CC) << format->direct.red  )
-              | ((color.g * format->direct.greenMask / rgba::MAX_CC) << format->direct.green)
-              | ((color.b * format->direct.blueMask  / rgba::MAX_CC) << format->direct.blue )
-              | ((color.a * format->direct.alphaMask / rgba::MAX_CC) << format->direct.alpha);
+      c.pixel = insert_component (color.r, format->direct.redMask  , format->direct.red  )
+              | insert_component (color.g, format->direct.greenMask, format->direct.green)
+              | insert_component (color.b, format->direct.blueMask , format->direct.blue )
+              | insert_component (color.a, format->direct.alphaMask, format->direct.alpha);
 
       return true;
     }