From f11107c987b8d27a78f94697c61407ab7ff7f10a Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Wed, 19 Nov 2008 03:41:38 +0000 Subject: [PATCH] Don't create an input window if there is no windows. BUG: 175541 svn path=/trunk/KDE/kdebase/workspace/; revision=886374 --- effects/flipswitch.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/effects/flipswitch.cpp b/effects/flipswitch.cpp index 18513c6ed7..d2bbd05b11 100644 --- a/effects/flipswitch.cpp +++ b/effects/flipswitch.cpp @@ -493,9 +493,9 @@ void FlipSwitchEffect::tabBoxAdded( int mode ) if( !mActivated ) { // only for windows mode - input = effects->createFullScreenInputWindow( this, Qt::BlankCursor ); if( mode == TabBoxWindowsMode && effects->currentTabBoxWindowList().count() > 0 ) { + input = effects->createFullScreenInputWindow( this, Qt::BlankCursor ); effects->refTabBox(); effects->setActiveFullScreenEffect( this ); selectedWindow = effects->currentTabBoxWindowList().indexOf(effects->currentTabBoxWindow()); @@ -529,7 +529,8 @@ void FlipSwitchEffect::tabBoxClosed() // if animation than deactivate after animation mActivated = false; effects->unrefTabBox(); - effects->destroyInputWindow( input ); + if( input ) + effects->destroyInputWindow( input ); if( mAnimation ) { if( start && rearrangeWindows == 0 )