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
This commit is contained in:
parent
e0752e57d3
commit
48912dd264
2 changed files with 26 additions and 3 deletions
|
@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
#include "fallapart.h"
|
#include "fallapart.h"
|
||||||
|
#include <kdebug.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ void FallApartEffect::prePaintScreen( ScreenPrePaintData& data, int time )
|
||||||
|
|
||||||
void FallApartEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& 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 )
|
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 )
|
void FallApartEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data )
|
||||||
{
|
{
|
||||||
if( windows.contains( w ))
|
if( windows.contains( w ) && isRealWindow( w ) )
|
||||||
{
|
{
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
@ -119,8 +119,29 @@ void FallApartEffect::postPaintScreen()
|
||||||
effects->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 )
|
void FallApartEffect::windowClosed( EffectWindow* c )
|
||||||
{
|
{
|
||||||
|
if ( !isRealWindow( c ) )
|
||||||
|
return;
|
||||||
windows[ c ] = 0;
|
windows[ c ] = 0;
|
||||||
c->refWindow();
|
c->refWindow();
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,8 @@ class FallApartEffect
|
||||||
virtual void windowDeleted( EffectWindow* c );
|
virtual void windowDeleted( EffectWindow* c );
|
||||||
private:
|
private:
|
||||||
QHash< const EffectWindow*, double > windows;
|
QHash< const EffectWindow*, double > windows;
|
||||||
|
bool isRealWindow ( EffectWindow* w );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Reference in a new issue