summaryrefslogtreecommitdiff
path: root/xcompmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'xcompmgr.c')
-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);