diff --git a/effects/diminactive/diminactive.cpp b/effects/diminactive/diminactive.cpp index 51368ed0c1..ce851ee133 100644 --- a/effects/diminactive/diminactive.cpp +++ b/effects/diminactive/diminactive.cpp @@ -42,6 +42,7 @@ void DimInactiveEffect::reconfigure( ReconfigureFlags ) KConfigGroup conf = EffectsHandler::effectConfig("DimInactive"); dim_panels = conf.readEntry("DimPanels", false); dim_desktop = conf.readEntry("DimDesktop", false); + dim_keepabove = conf.readEntry("DimKeepAbove", false); dim_by_group = conf.readEntry("DimByGroup", true); dim_strength = conf.readEntry("Strength", 25); } @@ -88,6 +89,8 @@ bool DimInactiveEffect::dimWindow( const EffectWindow* w ) const return false; // don't dim panels if configured so if( w->isDesktop() && !dim_desktop ) return false; // don't dim the desktop if configured so + if( w->keepAbove() && !dim_keepabove ) + return false; // don't dim keep-above windows if configured so if( !w->isNormalWindow() && !w->isDialog() && !w->isDock() && !w->isDesktop()) return false; // don't dim more special window types // don't dim unmanaged windows, grouping doesn't work for them and maybe dimming diff --git a/effects/diminactive/diminactive.h b/effects/diminactive/diminactive.h index ff3915c451..d5be4f2464 100644 --- a/effects/diminactive/diminactive.h +++ b/effects/diminactive/diminactive.h @@ -48,6 +48,7 @@ class DimInactiveEffect int dim_strength; // reduce saturation and brightness by this percentage bool dim_panels; // do/don't dim also all panels bool dim_desktop; // do/don't dim the desktop + bool dim_keepabove; // do/don't dim keep-above windows bool dim_by_group; // keep visible all windows from the active window's group or only the active window }; diff --git a/effects/diminactive/diminactive_config.cpp b/effects/diminactive/diminactive_config.cpp index e3045ecda5..011998fb1c 100644 --- a/effects/diminactive/diminactive_config.cpp +++ b/effects/diminactive/diminactive_config.cpp @@ -53,6 +53,7 @@ DimInactiveEffectConfig::DimInactiveEffectConfig(QWidget* parent, const QVariant connect(m_ui->spinStrength, SIGNAL(valueChanged(int)), this, SLOT(changed())); connect(m_ui->checkPanel, SIGNAL(toggled(bool)), this, SLOT(changed())); connect(m_ui->checkDesktop, SIGNAL(toggled(bool)), this, SLOT(changed())); + connect(m_ui->checkKeepAbove, SIGNAL(toggled(bool)), this, SLOT(changed())); connect(m_ui->checkGroup, SIGNAL(toggled(bool)), this, SLOT(changed())); load(); @@ -67,10 +68,12 @@ void DimInactiveEffectConfig::load() int strength = conf.readEntry("Strength", 25); bool panel = conf.readEntry("DimPanels", false); bool desktop = conf.readEntry("DimDesktop", false); + bool keepabove = conf.readEntry("DimKeepAbove", false); bool group = conf.readEntry("DimByGroup", true); m_ui->spinStrength->setValue(strength); m_ui->checkPanel->setChecked(panel); m_ui->checkDesktop->setChecked(desktop); + m_ui->checkKeepAbove->setChecked(keepabove); m_ui->checkGroup->setChecked(group); emit changed(false); @@ -83,6 +86,7 @@ void DimInactiveEffectConfig::save() conf.writeEntry("Strength", m_ui->spinStrength->value()); conf.writeEntry("DimPanels", m_ui->checkPanel->isChecked()); conf.writeEntry("DimDesktop", m_ui->checkDesktop->isChecked()); + conf.writeEntry("DimKeepAbove", m_ui->checkKeepAbove->isChecked()); conf.writeEntry("DimByGroup", m_ui->checkGroup->isChecked()); conf.sync(); @@ -97,6 +101,7 @@ void DimInactiveEffectConfig::defaults() m_ui->spinStrength->setValue(25); m_ui->checkPanel->setChecked(false); m_ui->checkDesktop->setChecked(false); + m_ui->checkKeepAbove->setChecked(false); m_ui->checkGroup->setChecked(true); emit changed(true); } diff --git a/effects/diminactive/diminactive_config.ui b/effects/diminactive/diminactive_config.ui index a233da80d5..dae6075009 100644 --- a/effects/diminactive/diminactive_config.ui +++ b/effects/diminactive/diminactive_config.ui @@ -25,6 +25,13 @@ + + + Apply effect to &keep-above windows + + + + Apply effect to &groups @@ -76,7 +83,7 @@ - + Qt::Vertical