*** empty log message ***
authorroot <root>
Sun, 29 Jan 2006 22:27:04 +0000 (22:27 +0000)
committerroot <root>
Sun, 29 Jan 2006 22:27:04 +0000 (22:27 +0000)
Changes
doc/rxvt.1.pod
src/rxvttoolkit.C
src/rxvtutil.C
src/rxvtutil.h
src/xdefaults.C

diff --git a/Changes b/Changes
index 5ce565891a74a01004376b012aded26ebe5cb63d..c57317708f0d1e6ac3f36185a2f19b246083bf46 100644 (file)
--- a/Changes
+++ b/Changes
@@ -19,7 +19,8 @@ DUMB: support tex fonts
         - small configure updates.
         - overhauled color management: smaller codesize, alpha support.
         - support rgba:r/g/b/a, #argb, #aarrggbb and #aaaarrrrggggbbbb
-          colour "names".
+          colour "names", and try to work around xft forcing everything
+          to be 100% transparent. Long Live Xft!
         - do not include X11/Intrinsic.h anymore, directly use
           Xlib/Xutil/Xresource directly.
 
index 86fb907488f16d7d82b7411b5e5f8ccc2b2ee509..8e9c772cc9c267fb1f15f7cbe481e1efe41c458c 100644 (file)
@@ -97,7 +97,7 @@ B<DISPLAY> environment variable is used.
 
 =item B<-depth> I<bitdepth>
 
-Compile I<frills>: Attempt to find a visual with the given bit depth;
+Compile I<xft>: Attempt to find a visual with the given bit depth;
 resource B<depth>.
 
 =item B<-geometry> I<geom>
@@ -514,7 +514,7 @@ extensions not documented here):
 
 =item B<depth:> I<bitdepth>
 
-Compile I<frills>: Attempt to find a visual with the given bit depth;
+Compile I<xft>: Attempt to find a visual with the given bit depth;
 option B<-depth>.
 
 =item B<geometry:> I<geom>
index aa4356c1d8d8fcb853a77ba8ab05ed85cf1abded..fcd2fbc57062913ec9cbf2b35726022e3f1205a5 100644 (file)
@@ -591,10 +591,10 @@ rxvt_color::set (rxvt_screen *screen, rxvt_rgba rgba)
       c.color.blue  = rgba.b;
       c.color.alpha = rgba.a;
 
-      c.pixel = (rgba.r >> (16 - popcount (format->direct.redMask  )) << format->direct.red)
-              | (rgba.g >> (16 - popcount (format->direct.greenMask)) << format->direct.green)
-              | (rgba.b >> (16 - popcount (format->direct.blueMask )) << format->direct.blue)
-              | (rgba.a >> (16 - popcount (format->direct.alphaMask)) << format->direct.alpha);
+      c.pixel = ((rgba.r * format->direct.redMask   / rxvt_rgba::MAX_CC) << format->direct.red)
+              | ((rgba.g * format->direct.greenMask / rxvt_rgba::MAX_CC) << format->direct.green)
+              | ((rgba.b * format->direct.blueMask  / rxvt_rgba::MAX_CC) << format->direct.blue)
+              | ((rgba.a * format->direct.alphaMask / rxvt_rgba::MAX_CC) << format->direct.alpha);
 
       return true;
     }
index bf1baa418b8b76d354cbf6830130db360a3074b1..d2cd7c085da943267a2743bbff747d9e48cb7522 100644 (file)
@@ -23,6 +23,33 @@ byteorder::byteorder ()
   e = w.u;
 }
 
+#if !HAVE_GCC_BUILTINS
+int ctz (unsigned int x)
+{
+  int r = 0;
+
+  x &= -x; // this isolates the lowest bit
+
+  if (x & 0xaaaaaaaa) r +=  1;
+  if (x & 0xcccccccc) r +=  2;
+  if (x & 0xf0f0f0f0) r +=  4;
+  if (x & 0xff00ff00) r +=  8;
+  if (x & 0xffff0000) r += 16;
+
+  return r;
+}
+
+int popcount (unsigned int x)
+{
+  x -=  (x >> 1) & 0x55555555;
+  x  = ((x >> 2) & 0x33333333) + (x & 0x33333333);
+  x  = ((x >> 4) + x) & 0x0f0f0f0f;
+  x *= 0x01010101;
+
+  return x >> 24;
+}
+#endif
+
 void *
 zero_initialized::operator new (size_t s)
 {
index bdbdb9f71c533a53e1944afdff30e522b37913cc..71725ebba4803aef945b5f1793bdc16bbd654405 100644 (file)
@@ -11,7 +11,6 @@
 
 // actually, some gcc-3.x versions work, too
 #define HAVE_GCC_BUILTINS (__GNUC__ >= 4)
-#define HAVE_GCC_BUILTINS 0
 
 extern class byteorder {
   static unsigned int e; // at least 32 bits
index 6b64bb2b38c3a3305d0947ae4dc907ff9ee0e890..36fe7c10e0daa8bb2f26f71a392db3dc7f72e1da 100644 (file)
@@ -213,12 +213,14 @@ optList[] = {
 #if ENABLE_XEMBED
               STRG (Rs_embed, NULL, "embed", "windowid", "window id to embed terminal in"),
 #endif
+#if XFT
+              STRG (Rs_depth, "depth", "depth", "number", "depth of visual to request"),
+#endif
 #if ENABLE_FRILLS
               RSTRG (Rs_transient_for, "transient-for", "windowid"),
               BOOL (Rs_override_redirect, "override-redirect", "override-redirect", Opt_override_redirect, "set override-redirect on the terminal window"),
               STRG (Rs_pty_fd, NULL, "pty-fd", "fileno", "file descriptor of pty to use"),
               BOOL (Rs_hold, "hold", "hold", Opt_hold, "retain window after shell exit"),
-              STRG (Rs_depth, "depth", "depth", "number", "depth of visual to request"),
               STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"),
               STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL),
               STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL),