Option to turn off slide during change.

svn path=/trunk/KDE/kdebase/workspace/; revision=682448
This commit is contained in:
Luboš Luňák 2007-07-02 17:56:46 +00:00
parent bdb46a1769
commit d74361c378
2 changed files with 5 additions and 0 deletions

View file

@ -38,6 +38,8 @@ DesktopGridEffect::DesktopGridEffect()
a->setText( i18n("Show Desktop Grid" ));
a->setGlobalShortcut( KShortcut( Qt::CTRL + Qt::Key_F8 ));
connect( a, SIGNAL( triggered( bool )), this, SLOT( toggle()));
KConfigGroup conf = effects->effectConfig("DesktopGrid");
slideEnabled = conf.readEntry( "Slide", true );
}
void DesktopGridEffect::prePaintScreen( int* mask, QRegion* region, int time )
@ -355,6 +357,8 @@ void DesktopGridEffect::desktopChanged( int old )
void DesktopGridEffect::slideDesktopChanged( int old )
{
if( !slideEnabled )
return;
if( slide ) // old slide still in progress
{
QPoint diffPos = desktopRect( old, false ).topLeft() - slide_start_pos;

View file

@ -55,6 +55,7 @@ class DesktopGridEffect
EffectWindow* window_move;
QPoint window_move_diff;
QPoint window_move_pos;
bool slideEnabled;
bool slide;
QPoint slide_start_pos;
bool slide_painting_sticky;