diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index b7c7dbfd0e..53890e68a4 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -141,7 +141,8 @@ 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 ); + dontSlidePanels = conf.readEntry( "DontSlidePanels", true ); + dontSlideStickyWindows = conf.readEntry( "DontSlideStickyWindows", true ); QString file = conf.readEntry( "Wallpaper", QString("") ); if( wallpaper ) wallpaper->discard(); @@ -234,6 +235,8 @@ void CubeEffect::prePaintScreen( ScreenPrePaintData& data, int time ) recompileList = true; if( dontSlidePanels ) panels.clear(); + if( dontSlideStickyWindows ) + stickyWindows.clear(); } } effects->prePaintScreen( data, time ); @@ -558,6 +561,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 && dontSlideStickyWindows ) + { + foreach( EffectWindow* w, stickyWindows ) + { + WindowPaintData wData( w ); + effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData ); + } + } } else { @@ -1040,6 +1051,7 @@ void CubeEffect::postPaintScreen() effects->destroyInputWindow( input ); windowsOnOtherScreens.clear(); panels.clear(); + stickyWindows.clear(); effects->setActiveFullScreenEffect( 0 ); @@ -1264,9 +1276,14 @@ void CubeEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int } w->disablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP ); } - if( slide && dontSlidePanels && w->isDock() && painting_desktop == effects->currentDesktop() ) + if( slide && dontSlidePanels && w->isDock()) { - panels.append( w ); + panels.insert( w ); + } + if( slide && dontSlideStickyWindows && !w->isDock() && + !w->isDesktop() && w->isOnAllDesktops()) + { + stickyWindows.insert( w ); } } } @@ -1279,6 +1296,9 @@ void CubeEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowP { if( slide && dontSlidePanels && w->isDock() ) return; + if( slide && dontSlideStickyWindows && + w->isOnAllDesktops() && !w->isDock() && !w->isDesktop() ) + return; //kDebug(1212) << w->caption(); float opacity = cubeOpacity; if( slide ) diff --git a/effects/cube/cube.h b/effects/cube/cube.h index 50e9f5d4bc..0e67a71781 100644 --- a/effects/cube/cube.h +++ b/effects/cube/cube.h @@ -25,6 +25,7 @@ along with this program. If not, see . #include #include #include +#include namespace KWin { @@ -116,7 +117,8 @@ class CubeEffect int oldDesktop; int rotationDuration; QList windowsOnOtherScreens; - QList panels; + QSet panels; + QSet stickyWindows; int activeScreen; bool animateDesktopChange; bool bigCube; @@ -129,6 +131,7 @@ class CubeEffect bool invertMouse; bool tabBoxMode; bool dontSlidePanels; + bool dontSlideStickyWindows; bool shortcutsRegistered; // GL lists diff --git a/effects/cube/cube_config.cpp b/effects/cube/cube_config.cpp index f28504af16..643e60ecfb 100644 --- a/effects/cube/cube_config.cpp +++ b/effects/cube/cube_config.cpp @@ -85,6 +85,7 @@ CubeEffectConfig::CubeEffectConfig(QWidget* parent, const QVariantList& args) : 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())); + connect(m_ui->dontSlideStickyWindowsBox, SIGNAL(stateChanged(int)), this, SLOT(changed())); load(); } @@ -112,7 +113,8 @@ 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 ); + bool dontSlidePanels = conf.readEntry( "DontSlidePanels", true ); + bool dontSlideStickyWindows = conf.readEntry( "DontSlideStickyWindows", true ); m_ui->rotationDurationSpin->setValue( duration ); m_ui->cubeOpacitySlider->setValue( opacity ); @@ -187,6 +189,7 @@ void CubeEffectConfig::load() m_ui->invertKeysBox->setChecked( invertKeys ); m_ui->invertMouseBox->setChecked( invertMouse ); m_ui->dontSlidePanelsBox->setChecked( dontSlidePanels ); + m_ui->dontSlideStickyWindowsBox->setChecked( dontSlideStickyWindows ); capsSelectionChanged(); emit changed(false); @@ -214,6 +217,7 @@ void CubeEffectConfig::save() conf.writeEntry( "InvertKeys", m_ui->invertKeysBox->isChecked() ); conf.writeEntry( "InvertMouse", m_ui->invertMouseBox->isChecked() ); conf.writeEntry( "DontSlidePanels", m_ui->dontSlidePanelsBox->isChecked() ); + conf.writeEntry( "DontSlideStickyWindows", m_ui->dontSlideStickyWindowsBox->isChecked() ); m_ui->editor->save(); @@ -243,7 +247,8 @@ 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->dontSlidePanelsBox->setChecked( true ); + m_ui->dontSlideStickyWindowsBox->setChecked( true ); m_ui->editor->allDefault(); emit changed(true); } diff --git a/effects/cube/cube_config.ui b/effects/cube/cube_config.ui index 8ecbfa7b4a..fd180f0367 100644 --- a/effects/cube/cube_config.ui +++ b/effects/cube/cube_config.ui @@ -5,7 +5,7 @@ 0 0 - 700 + 747 566 @@ -314,23 +314,10 @@ - - - - Qt::Vertical - - - - 20 - 40 - - - - - + Zoom @@ -381,7 +368,7 @@ - + Qt::Vertical @@ -394,29 +381,12 @@ - + Additional Options - - - - - - - Display the cube when switching desktops - - - - - - - Fix panels while switching desktops - - - @@ -460,6 +430,58 @@ otherwise it will remain active + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Animate Desktop Change + + + + + + + + + Display the cube when switching desktops + + + + + + + false + + + Do not animate panels + + + + + + + false + + + Do not animate windows on all desktops + + + @@ -501,13 +523,14 @@ otherwise it will remain active cubeCapsBox capColorButton capsImageBox - animateDesktopChangeBox - dontSlidePanelsBox bigCubeBox closeOnMouseReleaseBox walkThroughDesktopBox invertKeysBox invertMouseBox + animateDesktopChangeBox + dontSlidePanelsBox + dontSlideStickyWindowsBox zPositionSlider @@ -519,12 +542,12 @@ otherwise it will remain active setValue(int) - 386 - 175 + 725 + 102 - 235 - 162 + 568 + 101 @@ -535,12 +558,44 @@ otherwise it will remain active setValue(int) - 133 - 162 + 466 + 101 - 386 - 175 + 725 + 102 + + + + + animateDesktopChangeBox + toggled(bool) + dontSlidePanelsBox + setEnabled(bool) + + + 147 + 209 + + + 147 + 232 + + + + + animateDesktopChangeBox + toggled(bool) + dontSlideStickyWindowsBox + setEnabled(bool) + + + 53 + 209 + + + 27 + 261