summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Woofenden <jason@jasonwoof.com>2011-12-26 21:08:05 -0500
committerAlan Coopersmith <alan.coopersmith@oracle.com>2019-02-17 17:47:56 -0800
commit9c86c0f21b9d34c0ae491327482415a946102c4f (patch)
treee717f7c854941f75a0aebab2fb6376ba5f31928a
parent3f37d974bedea52c0b4d8cf576baa2180a8f222d (diff)
fix fade-in speed when opacity raises
Fixes: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648158 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xcompmgr.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/xcompmgr.c b/xcompmgr.c
index 3968def..4e40958 100644
--- a/xcompmgr.c
+++ b/xcompmgr.c
@@ -2337,8 +2337,17 @@ main (int argc, char **argv)
if (w)
{
if (fadeTrans)
- set_fade (dpy, w, w->opacity*1.0/OPAQUE, get_opacity_percent (dpy, w, 1.0),
- fade_out_step, NULL, False, True, False);
+ {
+ double start, finish, step;
+ start = w->opacity*1.0/OPAQUE;
+ finish = get_opacity_percent (dpy, w, 1.0);
+ if(start > finish)
+ step = fade_in_step;
+ else
+ step = fade_out_step;
+ set_fade (dpy, w, start, finish, step,
+ NULL, False, True, False);
+ }
else
{
w->opacity = get_opacity_prop(dpy, w, OPAQUE);