summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-05-21 14:06:52 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-05-21 17:03:06 -0400
commita416fa15d5dfff2f9a10294340400f5a56ac039c (patch)
tree89195a41e96d7b3a42d8f6e58faa244d13d7d373 /src/util.c
parent579f2934de21847c6f31ce5417afab81d6d3d37b (diff)
xwm: Switch alpha, brightness and saturation to GLfloat
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c
index b06efd08..33dd7dbe 100644
--- a/src/util.c
+++ b/src/util.c
@@ -153,9 +153,9 @@ weston_zoom_frame(struct weston_animation *animation,
0.5f * es->geometry.width,
0.5f * es->geometry.height, 0);
- es->alpha = zoom->spring.current * 255;
- if (es->alpha > 255)
- es->alpha = 255;
+ es->alpha = zoom->spring.current;
+ if (es->alpha > 1.0)
+ es->alpha = 1.0;
zoom->surface->geometry.dirty = 1;
weston_compositor_schedule_repaint(es->compositor);
@@ -375,7 +375,7 @@ weston_fade_frame(struct weston_animation *animation,
fade_factor = 0;
else
fade_factor = fade->spring.current;
- es->alpha = fade_factor * 255;
+ es->alpha = fade_factor;
fade->surface->geometry.dirty = 1;
weston_compositor_schedule_repaint(es->compositor);