diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index dbeba8680c..05f70ec610 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -139,6 +139,7 @@ void CubeEffect::loadConfig( QString config ) useForTabBox = conf.readEntry( "TabBox", false ); invertKeys = conf.readEntry( "InvertKeys", false ); invertMouse = conf.readEntry( "InvertMouse", false ); + dontSlidePanels = conf.readEntry( "DontSlidePanels", false ); QString file = conf.readEntry( "Wallpaper", QString("") ); if( wallpaper ) wallpaper->discard(); @@ -223,6 +224,8 @@ void CubeEffect::prePaintScreen( ScreenPrePaintData& data, int time ) verticalTimeLine.addTime( time ); recompileList = true; } + if( slide && dontSlidePanels ) + panels.clear(); } 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 ); } } + 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 { @@ -980,6 +991,8 @@ void CubeEffect::postPaintScreen() effects->ungrabKeyboard(); keyboard_grab = false; effects->destroyInputWindow( input ); + windowsOnOtherScreens.clear(); + panels.clear(); effects->setActiveFullScreenEffect( 0 ); @@ -1172,6 +1185,10 @@ void CubeEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int } w->disablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP ); } + if( slide && dontSlidePanels && w->isDock() && painting_desktop == effects->currentDesktop() ) + { + panels.append( w ); + } } } effects->prePaintWindow( w, data, time ); @@ -1181,6 +1198,8 @@ void CubeEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowP { if( activated && cube_painting ) { + if( slide && dontSlidePanels && w->isDock() ) + return; //kDebug(1212) << w->caption(); float opacity = cubeOpacity; if( slide ) diff --git a/effects/cube/cube.h b/effects/cube/cube.h index 1120f9dd2e..7c0feda6e6 100644 --- a/effects/cube/cube.h +++ b/effects/cube/cube.h @@ -112,6 +112,7 @@ class CubeEffect int oldDesktop; int rotationDuration; QList windowsOnOtherScreens; + QList panels; int activeScreen; bool animateDesktopChange; bool bigCube; @@ -123,6 +124,8 @@ class CubeEffect bool invertKeys; bool invertMouse; bool tabBoxMode; + bool dontSlidePanels; + bool shortcutsRegistered; // GL lists bool capListCreated; diff --git a/effects/cube/cube_config.cpp b/effects/cube/cube_config.cpp index 2dc3ec39c9..d9ca3b0c0d 100644 --- a/effects/cube/cube_config.cpp +++ b/effects/cube/cube_config.cpp @@ -83,6 +83,7 @@ CubeEffectConfig::CubeEffectConfig(QWidget* parent, const QVariantList& args) : connect(m_ui->walkThroughDesktopBox, 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->dontSlidePanelsBox, SIGNAL(stateChanged(int)), this, SLOT(changed())); load(); } @@ -109,6 +110,7 @@ void CubeEffectConfig::load() m_ui->wallpaperRequester->setPath( conf.readEntry( "Wallpaper", "" ) ); bool invertKeys = conf.readEntry( "InvertKeys", false ); bool invertMouse = conf.readEntry( "InvertMouse", false ); + bool dontSlidePanels = conf.readEntry( "DontSlidePanels", false ); m_ui->rotationDurationSpin->setValue( duration ); m_ui->cubeOpacitySlider->setValue( opacity ); @@ -181,6 +183,7 @@ void CubeEffectConfig::load() m_ui->capColorButton->setColor( capColor ); m_ui->invertKeysBox->setChecked( invertKeys ); m_ui->invertMouseBox->setChecked( invertMouse ); + m_ui->dontSlidePanelsBox->setChecked( dontSlidePanels ); capsSelectionChanged(); emit changed(false); @@ -206,6 +209,7 @@ void CubeEffectConfig::save() conf.writeEntry( "TabBox", m_ui->walkThroughDesktopBox->checkState() == Qt::Checked ? true : false ); conf.writeEntry( "InvertKeys", m_ui->invertKeysBox->isChecked() ); conf.writeEntry( "InvertMouse", m_ui->invertMouseBox->isChecked() ); + conf.writeEntry( "DontSlidePanels", m_ui->dontSlidePanelsBox->isChecked() ); m_ui->editor->save(); @@ -234,6 +238,7 @@ void CubeEffectConfig::defaults() m_ui->walkThroughDesktopBox->setCheckState( Qt::Unchecked ); m_ui->invertKeysBox->setChecked( false ); m_ui->invertMouseBox->setChecked( false ); + m_ui->dontSlidePanelsBox->setChecked( false ); m_ui->editor->allDefault(); emit changed(true); } diff --git a/effects/cube/cube_config.ui b/effects/cube/cube_config.ui index 3a6318ae17..16eb979ca3 100644 --- a/effects/cube/cube_config.ui +++ b/effects/cube/cube_config.ui @@ -403,6 +403,13 @@ + + + + Fix panels while switching desktops + + + @@ -487,6 +494,7 @@ otherwise it will remain active capColorButton capsImageBox animateDesktopChangeBox + dontSlidePanelsBox bigCubeBox closeOnMouseReleaseBox walkThroughDesktopBox