summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2007-11-24 12:13:33 +0000
committerIain Holmes <iain@src.gnome.org>2007-11-24 12:13:33 +0000
commit19b623e02aad49742e4229f6031bdfde3a2ef494 (patch)
tree2863873635f242d555ccc758d632ed0b7dc22f37
parent586c5e621280e76640cf26ec0917e24493c732ad (diff)
downloadmetacity-19b623e02aad49742e4229f6031bdfde3a2ef494.tar.gz
Patch from Jonathan Matthew to fix window translucency calculation
cockups. svn path=/branches/iains-blingtastic-bucket-o-bling/; revision=3435
-rw-r--r--src/compositor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compositor.c b/src/compositor.c
index a7ff4660..1d0b3336 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -125,7 +125,7 @@ typedef struct _MetaCompWindow
int shadow_width;
int shadow_height;
- int opacity;
+ guint opacity;
XserverRegion border_clip;
} MetaCompWindow;
@@ -727,7 +727,7 @@ win_extents (MetaCompWindow *cw)
if (!cw->shadow)
{
double opacity = SHADOW_OPACITY;
- if (cw->opacity != (int) OPAQUE)
+ if (cw->opacity != (guint) OPAQUE)
opacity = opacity * ((double) cw->opacity) / ((double) OPAQUE);
cw->shadow = shadow_picture (display, screen, opacity, cw->alpha_pict,
@@ -982,7 +982,7 @@ paint_windows (MetaScreen *screen,
XFixesDestroyRegion (xdisplay, shadow_clip);
}
- if ((cw->opacity != (int) OPAQUE) && !(cw->alpha_pict))
+ if ((cw->opacity != (guint) OPAQUE) && !(cw->alpha_pict))
{
cw->alpha_pict = solid_picture (display, screen, FALSE,
(double) cw->opacity / OPAQUE,
@@ -1331,7 +1331,7 @@ determine_mode (MetaDisplay *display,
format = XRenderFindVisualFormat (display->xdisplay, cw->attrs.visual);
if ((format && format->type == PictTypeDirect && format->direct.alphaMask)
- || cw->opacity != (int) OPAQUE)
+ || cw->opacity != (guint) OPAQUE)
cw->mode = WINDOW_ARGB;
else
cw->mode = WINDOW_SOLID;
@@ -1720,7 +1720,7 @@ process_property_notify (MetaCompositor *compositor,
&value) == FALSE)
value = OPAQUE;
- cw->opacity = value;
+ cw->opacity = (guint)value;
determine_mode (display, cw->screen, cw);
if (cw->shadow)
{