diff --git a/effects/snow.cpp b/effects/snow.cpp index 49fb696b0b..b259b4d809 100644 --- a/effects/snow.cpp +++ b/effects/snow.cpp @@ -50,6 +50,7 @@ SnowEffect::SnowEffect() , mShader( 0 ) , mInited( false ) , mUseShader( true ) + , hasSnown( false ) { srandom( std::time( NULL ) ); nextFlakeMillis = 0; @@ -81,7 +82,7 @@ void SnowEffect::reconfigure( ReconfigureFlags ) void SnowEffect::prePaintScreen( ScreenPrePaintData& data, int time ) { - if ( active ) + if ( active && effects->activeFullScreenEffect() == NULL ) { // if number of active snowflakes is smaller than maximum number // create a random new snowflake @@ -101,6 +102,7 @@ void SnowEffect::prePaintScreen( ScreenPrePaintData& data, int time ) nextFlakeMillis = next; } data.mask |= PAINT_SCREEN_TRANSFORMED; + hasSnown = false; } effects->prePaintScreen( data, time ); } @@ -116,6 +118,8 @@ void SnowEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) void SnowEffect::snowing( QRegion& region ) { + if( effects->activeFullScreenEffect() != NULL ) + return; if(! texture ) loadTexture(); if( texture ) { @@ -136,10 +140,14 @@ void SnowEffect::snowing( QRegion& region ) for (int i=0; iunbind(); glPopAttrib(); + hasSnown = true; } } diff --git a/effects/snow.h b/effects/snow.h index 4c4ebdc933..d11bc60e3d 100644 --- a/effects/snow.h +++ b/effects/snow.h @@ -98,6 +98,7 @@ class SnowEffect bool mInited; bool mUseShader; QRegion repaintRegion; + bool hasSnown; }; } // namespace