From 28ad33fd5fccec49935bf94d25ee3cd5f2d3d9b9 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 29 May 2007 03:36:12 +0000 Subject: [PATCH] brackets ftw. opacity for rgba's works. --- openbox/focus_cycle_popup.c | 2 +- render/image.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c index 7d132b6a..0bfe9b6b 100644 --- a/openbox/focus_cycle_popup.c +++ b/openbox/focus_cycle_popup.c @@ -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; diff --git a/render/image.c b/render/image.c index 1e76e6ba..e6e8b8b9 100644 --- a/render/image.c +++ b/render/image.c @@ -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; -- 2.39.2