[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/kwin/effects/fallapart
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2010-09-07 21:52:51
Message-ID: 20100907215251.76006AC876 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1172706 by lunakl:
config option to specify size of blocks to fall apart to
M +12 -1 fallapart.cpp
M +3 -1 fallapart.h
--- trunk/KDE/kdebase/workspace/kwin/effects/fallapart/fallapart.cpp #1172705:1172706
@@ -28,6 +28,17 @@
KWIN_EFFECT( fallapart, FallApartEffect )
+FallApartEffect::FallApartEffect()
+ {
+ reconfigure( ReconfigureAll );
+ }
+
+void FallApartEffect::reconfigure( ReconfigureFlags )
+ {
+ KConfigGroup conf = effects->effectConfig( "FallApart" );
+ blockSize = qBound( 1, conf.readEntry( "BlockSize", 40 ), 100000 );
+ }
+
void FallApartEffect::prePaintScreen( ScreenPrePaintData& data, int time )
{
if( !windows.isEmpty())
@@ -45,7 +56,7 @@
data.setTransformed();
w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DELETE );
// Request the window to be divided into cells
- data.quads = data.quads.makeGrid( 40 );
+ data.quads = data.quads.makeGrid( blockSize );
}
else
{
--- trunk/KDE/kdebase/workspace/kwin/effects/fallapart/fallapart.h #1172705:1172706
@@ -30,6 +30,8 @@
: public Effect
{
public:
+ FallApartEffect();
+ virtual void reconfigure( ReconfigureFlags );
virtual void prePaintScreen( ScreenPrePaintData& data, int time );
virtual void prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int time );
virtual void paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data );
@@ -39,7 +41,7 @@
private:
QHash< const EffectWindow*, double > windows;
bool isRealWindow ( EffectWindow* w );
-
+ int blockSize;
};
} // namespace
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic