]> Dogcows Code - chaz/openbox/commitdiff
brackets ftw. opacity for rgba's works.
authorDana Jansens <danakj@orodu.net>
Tue, 29 May 2007 03:36:12 +0000 (03:36 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 29 May 2007 03:36:12 +0000 (03:36 +0000)
openbox/focus_cycle_popup.c
render/image.c

index 7d132b6ab55298f822104d59da82d131955f12e3..0bfe9b6bd52d2fc0dd4b0aa86abd3f3c6388be2d 100644 (file)
@@ -424,7 +424,7 @@ static void popup_render(ObFocusCyclePopup *p, const ObClient *c)
             p->a_icon->texture[0].data.rgba.height = icon->height;
             if (target->client->iconic)
                 /* 7/16 alpha */
-                p->a_icon->texture[0].data.rgba.alpha = (0xff>>1 - 0xff>>4);
+                p->a_icon->texture[0].data.rgba.alpha = (0xff>>1) - (0xff>>4);
             else
                 p->a_icon->texture[0].data.rgba.alpha = 0xff;
             p->a_icon->texture[0].data.rgba.data = icon->data;
index 1e76e6ba350bd46526d78007591107c6e5484111..e6e8b8b932f185a9d768592f8a83d8e9cfdca761 100644 (file)
@@ -153,7 +153,7 @@ void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba,
         guchar alpha, r, g, b, bgr, bgg, bgb;
 
         /* apply the rgba's opacity as well */
-        alpha = ((*source >> RrDefaultAlphaOffset) * rgba->alpha >> 8) & 0xff;
+        alpha = (((*source >> RrDefaultAlphaOffset) * rgba->alpha) >> 8)&0xff;
         r = *source >> RrDefaultRedOffset;
         g = *source >> RrDefaultGreenOffset;
         b = *source >> RrDefaultBlueOffset;
This page took 0.025913 seconds and 4 git commands to generate.