Option to not animate the panels during desktop switching animation.
FEATURE: 177730 svn path=/trunk/KDE/kdebase/workspace/; revision=922026
This commit is contained in:
parent
59208e430a
commit
026c90a983
4 changed files with 35 additions and 0 deletions
|
@ -139,6 +139,7 @@ void CubeEffect::loadConfig( QString config )
|
||||||
useForTabBox = conf.readEntry( "TabBox", false );
|
useForTabBox = conf.readEntry( "TabBox", false );
|
||||||
invertKeys = conf.readEntry( "InvertKeys", false );
|
invertKeys = conf.readEntry( "InvertKeys", false );
|
||||||
invertMouse = conf.readEntry( "InvertMouse", false );
|
invertMouse = conf.readEntry( "InvertMouse", false );
|
||||||
|
dontSlidePanels = conf.readEntry( "DontSlidePanels", false );
|
||||||
QString file = conf.readEntry( "Wallpaper", QString("") );
|
QString file = conf.readEntry( "Wallpaper", QString("") );
|
||||||
if( wallpaper )
|
if( wallpaper )
|
||||||
wallpaper->discard();
|
wallpaper->discard();
|
||||||
|
@ -223,6 +224,8 @@ void CubeEffect::prePaintScreen( ScreenPrePaintData& data, int time )
|
||||||
verticalTimeLine.addTime( time );
|
verticalTimeLine.addTime( time );
|
||||||
recompileList = true;
|
recompileList = true;
|
||||||
}
|
}
|
||||||
|
if( slide && dontSlidePanels )
|
||||||
|
panels.clear();
|
||||||
}
|
}
|
||||||
effects->prePaintScreen( data, time );
|
effects->prePaintScreen( data, time );
|
||||||
}
|
}
|
||||||
|
@ -536,6 +539,14 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
|
||||||
effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData );
|
effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( slide && dontSlidePanels )
|
||||||
|
{
|
||||||
|
foreach( EffectWindow* w, panels )
|
||||||
|
{
|
||||||
|
WindowPaintData wData( w );
|
||||||
|
effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -980,6 +991,8 @@ void CubeEffect::postPaintScreen()
|
||||||
effects->ungrabKeyboard();
|
effects->ungrabKeyboard();
|
||||||
keyboard_grab = false;
|
keyboard_grab = false;
|
||||||
effects->destroyInputWindow( input );
|
effects->destroyInputWindow( input );
|
||||||
|
windowsOnOtherScreens.clear();
|
||||||
|
panels.clear();
|
||||||
|
|
||||||
effects->setActiveFullScreenEffect( 0 );
|
effects->setActiveFullScreenEffect( 0 );
|
||||||
|
|
||||||
|
@ -1172,6 +1185,10 @@ void CubeEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int
|
||||||
}
|
}
|
||||||
w->disablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP );
|
w->disablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP );
|
||||||
}
|
}
|
||||||
|
if( slide && dontSlidePanels && w->isDock() && painting_desktop == effects->currentDesktop() )
|
||||||
|
{
|
||||||
|
panels.append( w );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
effects->prePaintWindow( w, data, time );
|
effects->prePaintWindow( w, data, time );
|
||||||
|
@ -1181,6 +1198,8 @@ void CubeEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowP
|
||||||
{
|
{
|
||||||
if( activated && cube_painting )
|
if( activated && cube_painting )
|
||||||
{
|
{
|
||||||
|
if( slide && dontSlidePanels && w->isDock() )
|
||||||
|
return;
|
||||||
//kDebug(1212) << w->caption();
|
//kDebug(1212) << w->caption();
|
||||||
float opacity = cubeOpacity;
|
float opacity = cubeOpacity;
|
||||||
if( slide )
|
if( slide )
|
||||||
|
|
|
@ -112,6 +112,7 @@ class CubeEffect
|
||||||
int oldDesktop;
|
int oldDesktop;
|
||||||
int rotationDuration;
|
int rotationDuration;
|
||||||
QList<EffectWindow*> windowsOnOtherScreens;
|
QList<EffectWindow*> windowsOnOtherScreens;
|
||||||
|
QList<EffectWindow*> panels;
|
||||||
int activeScreen;
|
int activeScreen;
|
||||||
bool animateDesktopChange;
|
bool animateDesktopChange;
|
||||||
bool bigCube;
|
bool bigCube;
|
||||||
|
@ -123,6 +124,8 @@ class CubeEffect
|
||||||
bool invertKeys;
|
bool invertKeys;
|
||||||
bool invertMouse;
|
bool invertMouse;
|
||||||
bool tabBoxMode;
|
bool tabBoxMode;
|
||||||
|
bool dontSlidePanels;
|
||||||
|
bool shortcutsRegistered;
|
||||||
|
|
||||||
// GL lists
|
// GL lists
|
||||||
bool capListCreated;
|
bool capListCreated;
|
||||||
|
|
|
@ -83,6 +83,7 @@ CubeEffectConfig::CubeEffectConfig(QWidget* parent, const QVariantList& args) :
|
||||||
connect(m_ui->walkThroughDesktopBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
connect(m_ui->walkThroughDesktopBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
connect(m_ui->invertKeysBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
connect(m_ui->invertKeysBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
connect(m_ui->invertMouseBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
connect(m_ui->invertMouseBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
|
connect(m_ui->dontSlidePanelsBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
|
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
@ -109,6 +110,7 @@ void CubeEffectConfig::load()
|
||||||
m_ui->wallpaperRequester->setPath( conf.readEntry( "Wallpaper", "" ) );
|
m_ui->wallpaperRequester->setPath( conf.readEntry( "Wallpaper", "" ) );
|
||||||
bool invertKeys = conf.readEntry( "InvertKeys", false );
|
bool invertKeys = conf.readEntry( "InvertKeys", false );
|
||||||
bool invertMouse = conf.readEntry( "InvertMouse", false );
|
bool invertMouse = conf.readEntry( "InvertMouse", false );
|
||||||
|
bool dontSlidePanels = conf.readEntry( "DontSlidePanels", false );
|
||||||
|
|
||||||
m_ui->rotationDurationSpin->setValue( duration );
|
m_ui->rotationDurationSpin->setValue( duration );
|
||||||
m_ui->cubeOpacitySlider->setValue( opacity );
|
m_ui->cubeOpacitySlider->setValue( opacity );
|
||||||
|
@ -181,6 +183,7 @@ void CubeEffectConfig::load()
|
||||||
m_ui->capColorButton->setColor( capColor );
|
m_ui->capColorButton->setColor( capColor );
|
||||||
m_ui->invertKeysBox->setChecked( invertKeys );
|
m_ui->invertKeysBox->setChecked( invertKeys );
|
||||||
m_ui->invertMouseBox->setChecked( invertMouse );
|
m_ui->invertMouseBox->setChecked( invertMouse );
|
||||||
|
m_ui->dontSlidePanelsBox->setChecked( dontSlidePanels );
|
||||||
capsSelectionChanged();
|
capsSelectionChanged();
|
||||||
|
|
||||||
emit changed(false);
|
emit changed(false);
|
||||||
|
@ -206,6 +209,7 @@ void CubeEffectConfig::save()
|
||||||
conf.writeEntry( "TabBox", m_ui->walkThroughDesktopBox->checkState() == Qt::Checked ? true : false );
|
conf.writeEntry( "TabBox", m_ui->walkThroughDesktopBox->checkState() == Qt::Checked ? true : false );
|
||||||
conf.writeEntry( "InvertKeys", m_ui->invertKeysBox->isChecked() );
|
conf.writeEntry( "InvertKeys", m_ui->invertKeysBox->isChecked() );
|
||||||
conf.writeEntry( "InvertMouse", m_ui->invertMouseBox->isChecked() );
|
conf.writeEntry( "InvertMouse", m_ui->invertMouseBox->isChecked() );
|
||||||
|
conf.writeEntry( "DontSlidePanels", m_ui->dontSlidePanelsBox->isChecked() );
|
||||||
|
|
||||||
m_ui->editor->save();
|
m_ui->editor->save();
|
||||||
|
|
||||||
|
@ -234,6 +238,7 @@ void CubeEffectConfig::defaults()
|
||||||
m_ui->walkThroughDesktopBox->setCheckState( Qt::Unchecked );
|
m_ui->walkThroughDesktopBox->setCheckState( Qt::Unchecked );
|
||||||
m_ui->invertKeysBox->setChecked( false );
|
m_ui->invertKeysBox->setChecked( false );
|
||||||
m_ui->invertMouseBox->setChecked( false );
|
m_ui->invertMouseBox->setChecked( false );
|
||||||
|
m_ui->dontSlidePanelsBox->setChecked( false );
|
||||||
m_ui->editor->allDefault();
|
m_ui->editor->allDefault();
|
||||||
emit changed(true);
|
emit changed(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,6 +403,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="dontSlidePanelsBox" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Fix panels while switching desktops</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="bigCubeBox" >
|
<widget class="QCheckBox" name="bigCubeBox" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
|
@ -487,6 +494,7 @@ otherwise it will remain active</string>
|
||||||
<tabstop>capColorButton</tabstop>
|
<tabstop>capColorButton</tabstop>
|
||||||
<tabstop>capsImageBox</tabstop>
|
<tabstop>capsImageBox</tabstop>
|
||||||
<tabstop>animateDesktopChangeBox</tabstop>
|
<tabstop>animateDesktopChangeBox</tabstop>
|
||||||
|
<tabstop>dontSlidePanelsBox</tabstop>
|
||||||
<tabstop>bigCubeBox</tabstop>
|
<tabstop>bigCubeBox</tabstop>
|
||||||
<tabstop>closeOnMouseReleaseBox</tabstop>
|
<tabstop>closeOnMouseReleaseBox</tabstop>
|
||||||
<tabstop>walkThroughDesktopBox</tabstop>
|
<tabstop>walkThroughDesktopBox</tabstop>
|
||||||
|
|
Loading…
Reference in a new issue