From f9ce0427e8f26f453528493165e140f7ea96c924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 5 May 2008 11:58:53 +0000 Subject: [PATCH] Do not activate the effect with nothing to show. svn path=/trunk/KDE/kdebase/workspace/; revision=804228 --- effects/presentwindows.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index 0969a4f44b..3947238896 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -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()); }