From 53986fa859cf1f15f2adfdd02565c94c2f135e70 Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Sat, 3 Oct 2009 06:40:10 +0000 Subject: [PATCH] Prevent window flash that sometimes occurs when a sliding popup window is closed. Keeps the window transformed even in the last painting pass. svn path=/trunk/KDE/kdebase/workspace/; revision=1030717 --- effects/slidingpopups/slidingpopups.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index 07f1bffdea..eeba42ae57 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -66,18 +66,12 @@ void SlidingPopupsEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& d } else if( mDisappearingWindows.contains( w ) ) { + data.setTransformed(); + w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DELETE ); mDisappearingWindows[ w ].addTime( time ); - if( mDisappearingWindows[ w ].value() < 1 ) - { - data.setTransformed(); - w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DELETE ); - } - else - { - mDisappearingWindows.remove( w ); + if( mDisappearingWindows[ w ].value() >= 1 ) w->unrefWindow(); - } } effects->prePaintWindow( w, data, time ); }