Make pixel's allocated by ObRender opaque on 32-bit visuals by adding 0xff<<24 to...
authorDana Jansens <danakj@orodu.net>
Thu, 10 Jun 2010 20:41:08 +0000 (16:41 -0400)
committerDana Jansens <danakj@orodu.net>
Sat, 26 Jun 2010 23:30:48 +0000 (01:30 +0200)
obrender/color.c

index dd0551ee8b9d199b53f756778ea54b6123165653..3951182090987272e8a3105c050550214752e9ea 100644 (file)
@@ -71,7 +71,7 @@ RrColor *RrColorNew(const RrInstance *inst, gint r, gint g, gint b)
     g_assert(g >= 0 && g < 256);
     g_assert(b >= 0 && b < 256);
 
-    key = (r << 24) + (g << 16) + (b << 8);
+    key = (r << 24) + (g << 16) + (b << 8) + (0xff << 0);
 #ifndef NO_COLOR_CACHE
     if ((out = g_hash_table_lookup(RrColorHash(inst), &key))) {
         out->refcount++;
@@ -350,7 +350,8 @@ gint RrColorBlue(const RrColor *c)
 
 gulong RrColorPixel(const RrColor *c)
 {
-    return c->pixel;
+    /* make pixels opaque in 32-bit visuals */
+    return c->pixel | 0xff << 24;
 }
 
 GC RrColorGC(RrColor *c)