From 14b7540b266f02d2efbfb56fad27bd160d53b93d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 1 Jan 2010 20:45:40 +0000 Subject: [PATCH] It's possible that there is no active window when activating present windows for a window class. In that case do not activate the effect. BUG: 220916 svn path=/trunk/KDE/kdebase/workspace/; revision=1068693 --- effects/presentwindows/presentwindows.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index e46a61c646..b5dd5b86a4 100644 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -162,8 +162,13 @@ void* PresentWindowsEffect::proxy() void PresentWindowsEffect::toggleActiveClass() { - m_mode = ModeWindowClass; - m_class = effects->activeWindow()->windowClass(); + if( !m_activated ) + { + if( !effects->activeWindow() ) + return; + m_mode = ModeWindowClass; + m_class = effects->activeWindow()->windowClass(); + } setActive( !m_activated ); }