Option to turn off slide during change.
svn path=/trunk/KDE/kdebase/workspace/; revision=682448
This commit is contained in:
parent
bdb46a1769
commit
d74361c378
2 changed files with 5 additions and 0 deletions
|
@ -38,6 +38,8 @@ DesktopGridEffect::DesktopGridEffect()
|
||||||
a->setText( i18n("Show Desktop Grid" ));
|
a->setText( i18n("Show Desktop Grid" ));
|
||||||
a->setGlobalShortcut( KShortcut( Qt::CTRL + Qt::Key_F8 ));
|
a->setGlobalShortcut( KShortcut( Qt::CTRL + Qt::Key_F8 ));
|
||||||
connect( a, SIGNAL( triggered( bool )), this, SLOT( toggle()));
|
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 )
|
void DesktopGridEffect::prePaintScreen( int* mask, QRegion* region, int time )
|
||||||
|
@ -355,6 +357,8 @@ void DesktopGridEffect::desktopChanged( int old )
|
||||||
|
|
||||||
void DesktopGridEffect::slideDesktopChanged( int old )
|
void DesktopGridEffect::slideDesktopChanged( int old )
|
||||||
{
|
{
|
||||||
|
if( !slideEnabled )
|
||||||
|
return;
|
||||||
if( slide ) // old slide still in progress
|
if( slide ) // old slide still in progress
|
||||||
{
|
{
|
||||||
QPoint diffPos = desktopRect( old, false ).topLeft() - slide_start_pos;
|
QPoint diffPos = desktopRect( old, false ).topLeft() - slide_start_pos;
|
||||||
|
|
|
@ -55,6 +55,7 @@ class DesktopGridEffect
|
||||||
EffectWindow* window_move;
|
EffectWindow* window_move;
|
||||||
QPoint window_move_diff;
|
QPoint window_move_diff;
|
||||||
QPoint window_move_pos;
|
QPoint window_move_pos;
|
||||||
|
bool slideEnabled;
|
||||||
bool slide;
|
bool slide;
|
||||||
QPoint slide_start_pos;
|
QPoint slide_start_pos;
|
||||||
bool slide_painting_sticky;
|
bool slide_painting_sticky;
|
||||||
|
|
Loading…
Reference in a new issue