From 48912dd26480aa6e7f70ed9c263b712543f2ee76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Mon, 30 Jun 2008 12:52:06 +0000 Subject: [PATCH] Don't explode all windows (i.e. also menues) The window type doesn't seem to be accurate, i.e. pretty much all windows are normal and special. kickoff for example isn't a PopupMenu or something that enables us to not animate it. Well, at least this way tooltips and applicationmenues do not explode anymore. svn path=/trunk/KDE/kdebase/workspace/; revision=826321 --- effects/fallapart.cpp | 27 ++++++++++++++++++++++++--- effects/fallapart.h | 2 ++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/effects/fallapart.cpp b/effects/fallapart.cpp index e719516f3c..7f2a75d812 100644 --- a/effects/fallapart.cpp +++ b/effects/fallapart.cpp @@ -19,7 +19,7 @@ along with this program. If not, see . *********************************************************************/ #include "fallapart.h" - +#include #include #include @@ -37,7 +37,7 @@ void FallApartEffect::prePaintScreen( ScreenPrePaintData& data, int time ) void FallApartEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int time ) { - if( windows.contains( w )) + if( windows.contains( w ) && isRealWindow( w )) { if( windows[ w ] < 1 ) { @@ -58,7 +58,7 @@ void FallApartEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, void FallApartEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data ) { - if( windows.contains( w )) + if( windows.contains( w ) && isRealWindow( w ) ) { WindowQuadList new_quads; int cnt = 0; @@ -119,8 +119,29 @@ void FallApartEffect::postPaintScreen() effects->postPaintScreen(); } +bool FallApartEffect::isRealWindow( EffectWindow* w ) + { + // TODO: isSpecialWindow is rather generic, maybe tell windowtypes separately? + /* + kDebug() << "--" << w->caption() << "--------------------------------"; + kDebug() << "Tooltip:" << w->isTooltip(); + kDebug() << "Toolbar:" << w->isToolbar(); + kDebug() << "Desktop:" << w->isDesktop(); + kDebug() << "Special:" << w->isSpecialWindow(); + kDebug() << "TopMenu:" << w->isTopMenu(); + kDebug() << "Notific:" << w->isNotification(); + kDebug() << "Splash:" << w->isSplash(); + kDebug() << "Normal:" << w->isNormalWindow(); + */ + if ( !w->isNormalWindow() ) + return false; + return true; + } + void FallApartEffect::windowClosed( EffectWindow* c ) { + if ( !isRealWindow( c ) ) + return; windows[ c ] = 0; c->refWindow(); } diff --git a/effects/fallapart.h b/effects/fallapart.h index 94416ec964..24e988c197 100644 --- a/effects/fallapart.h +++ b/effects/fallapart.h @@ -38,6 +38,8 @@ class FallApartEffect virtual void windowDeleted( EffectWindow* c ); private: QHash< const EffectWindow*, double > windows; + bool isRealWindow ( EffectWindow* w ); + }; } // namespace