From: root Date: Wed, 5 Jul 2006 19:22:15 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=87d756d0c6f1fe29ee0df209af919488f630b45e;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/Changes b/Changes index 7463f948..284f4eee 100644 --- 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 diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C index 4db0eb19..102b69bf 100644 --- a/src/rxvttoolkit.C +++ b/src/rxvttoolkit.C @@ -1,4 +1,4 @@ -/*--------------------------------*-C-*---------------------------------* +/*----------------------------------------------------------------------* * File: rxvttoolkit.C *----------------------------------------------------------------------* * @@ -651,6 +651,13 @@ template class refcache; refcache 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; }