diff --git a/effects/diminactive.cpp b/effects/diminactive.cpp
index 5ea3ec9fdb..149e6a56fc 100644
--- a/effects/diminactive.cpp
+++ b/effects/diminactive.cpp
@@ -33,6 +33,7 @@ DimInactiveEffect::DimInactiveEffect()
KConfigGroup conf = EffectsHandler::effectConfig("DimInactive");
dim_panels = conf.readEntry("DimPanels", false);
+ dim_desktop = conf.readEntry("DimDesktop", false);
dim_by_group = conf.readEntry("DimByGroup", true);
dim_strength = conf.readEntry("Strength", 25);
active = effects->activeWindow();
@@ -56,7 +57,9 @@ bool DimInactiveEffect::dimWindow( const EffectWindow* w ) const
return false; // don't dim in active group if configured so
if( w->isDock() && !dim_panels )
return false; // don't dim panels if configured so
- if( !w->isNormalWindow() && !w->isDialog() && !w->isDock())
+ if( w->isDesktop() && !dim_desktop )
+ return false; // don't dim the desktop 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
// them doesn't make sense in general (they should be short-lived anyway)
diff --git a/effects/diminactive.h b/effects/diminactive.h
index 1069d33242..74fecc37cd 100644
--- a/effects/diminactive.h
+++ b/effects/diminactive.h
@@ -41,6 +41,7 @@ class DimInactiveEffect
EffectWindow* active;
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_by_group; // keep visible all windows from the active window's group or only the active window
};
diff --git a/effects/diminactive_config.cpp b/effects/diminactive_config.cpp
index 433a1c6002..8aa5c84e3e 100644
--- a/effects/diminactive_config.cpp
+++ b/effects/diminactive_config.cpp
@@ -54,6 +54,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->checkGroup, SIGNAL(toggled(bool)), this, SLOT(changed()));
load();
@@ -68,9 +69,11 @@ void DimInactiveEffectConfig::load()
int strength = conf.readEntry("Strength", 25);
bool panel = conf.readEntry("DimPanels", false);
+ bool desktop = conf.readEntry("DimDesktop", false);
bool group = conf.readEntry("DimByGroup", true);
m_ui->spinStrength->setValue(strength);
m_ui->checkPanel->setChecked(panel);
+ m_ui->checkDesktop->setChecked(desktop);
m_ui->checkGroup->setChecked(group);
emit changed(false);
@@ -84,6 +87,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("DimByGroup", m_ui->checkGroup->isChecked());
conf.sync();
@@ -98,6 +102,7 @@ void DimInactiveEffectConfig::defaults()
kDebug() ;
m_ui->spinStrength->setValue(25);
m_ui->checkPanel->setChecked(false);
+ m_ui->checkDesktop->setChecked(false);
m_ui->checkGroup->setChecked(true);
emit changed(true);
}
diff --git a/effects/diminactive_config.ui b/effects/diminactive_config.ui
index 98b5a56b66..7cc31a5895 100644
--- a/effects/diminactive_config.ui
+++ b/effects/diminactive_config.ui
@@ -60,6 +60,13 @@
+ -
+
+
+ Apply effect to the desk&top
+
+
+
-