Do not activate the effect with nothing to show.

svn path=/trunk/KDE/kdebase/workspace/; revision=804228
This commit is contained in:
Luboš Luňák 2008-05-05 11:58:53 +00:00
parent 4851bff561
commit f9ce0427e8

View file

@ -304,8 +304,6 @@ void PresentWindowsEffect::setActive(bool active)
if( mActivated )
{
mWindowData.clear();
effectActivated();
mActiveness = 0;
windowFilter.clear();
mWindowsToPresent.clear();
const EffectWindowList& originalwindowlist = effects->stackingOrder();
@ -320,6 +318,13 @@ void PresentWindowsEffect::setActive(bool active)
continue;
mWindowsToPresent.append(window);
}
if( mWindowsToPresent.isEmpty())
{
mActivated = false; // don't activate with nothing to show
return;
}
mActiveness = 0;
effectActivated();
rearrangeWindows();
setHighlightedWindow( effects->activeWindow());
}