From 86bd58b189137561beb1111a5f11d3d5273687b5 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 12 Apr 2006 05:27:19 +0000 Subject: [PATCH] Fix bug where 'fade out' setting was always used for fading between opacities, even if we were actually fading in. Also committed to 3.5 branch. svn path=/trunk/KDE/kdebase/workspace/; revision=528926 --- kompmgr/kompmgr.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kompmgr/kompmgr.c b/kompmgr/kompmgr.c index 32ef971dce..49e7d62c41 100644 --- a/kompmgr/kompmgr.c +++ b/kompmgr/kompmgr.c @@ -2878,7 +2878,16 @@ main (int argc, char **argv) break;*/ /*skip if opacity does not change*/ if (fadeTrans) { - set_fade (dpy, w, w->opacity*1.0/OPAQUE, (tmp*1.0)/OPAQUE, fade_out_step, 0, False, True, True, False); + static double start, finish, step; + start = w->opacity*1.0/OPAQUE; + finish = (tmp*1.0)/OPAQUE; + + if ( start > finish ) + step = fade_out_step; + else + step = fade_in_step; + + set_fade (dpy, w, start, finish, step, 0, False, True, True, False); break; } else