diff --git a/effects/boxswitch.cpp b/effects/boxswitch.cpp
index 73584d6482..559ffc12cd 100644
--- a/effects/boxswitch.cpp
+++ b/effects/boxswitch.cpp
@@ -47,6 +47,7 @@ BoxSwitchEffect::BoxSwitchEffect()
KConfigGroup conf = effects->effectConfig( "BoxSwitch" );
bg_opacity = conf.readEntry( "BackgroundOpacity", 25 ) / 100.0;
+ elevate_window = conf.readEntry( "ElevateSelected", true );
frame_margin = 10;
highlight_margin = 5;
@@ -359,12 +360,12 @@ void BoxSwitchEffect::setInactive()
void BoxSwitchEffect::setSelectedWindow( EffectWindow* w )
{
- if( selected_window )
+ if( elevate_window && selected_window )
{
effects->setElevatedWindow( selected_window, false );
}
selected_window = w;
- if( w )
+ if( elevate_window && w )
{
effects->setElevatedWindow( selected_window, true );
}
diff --git a/effects/boxswitch.h b/effects/boxswitch.h
index c3f26c81bd..bc3f7bd85a 100644
--- a/effects/boxswitch.h
+++ b/effects/boxswitch.h
@@ -85,6 +85,7 @@ class BoxSwitchEffect
QColor color_text;
float bg_opacity;
+ bool elevate_window;
QHash< EffectWindow*, ItemInfo* > windows;
EffectWindowList original_windows;
diff --git a/effects/boxswitch_config.cpp b/effects/boxswitch_config.cpp
index b5e76a04e8..a35786dcd7 100644
--- a/effects/boxswitch_config.cpp
+++ b/effects/boxswitch_config.cpp
@@ -46,6 +46,7 @@ BoxSwitchEffectConfig::BoxSwitchEffectConfig(QWidget* parent, const QVariantList
layout->addWidget( m_ui );
connect( m_ui->opacitySpin, SIGNAL( valueChanged(int) ), this, SLOT( changed() ));
+ connect( m_ui->elevateBox, SIGNAL( stateChanged(int) ), this, SLOT( changed() ));
load();
}
@@ -63,6 +64,9 @@ void BoxSwitchEffectConfig::load()
int opacity = conf.readEntry( "BackgroundOpacity", 25 );
m_ui->opacitySpin->setValue( opacity );
+ bool elevate = conf.readEntry( "ElevateSelected", true );
+ m_ui->elevateBox->setChecked( elevate );
+
emit changed(false);
}
@@ -74,6 +78,8 @@ void BoxSwitchEffectConfig::save()
conf.writeEntry( "BackgroundOpacity", m_ui->opacitySpin->value() );
+ conf.writeEntry( "ElevateSelected", m_ui->elevateBox->isChecked() );
+
conf.sync();
emit changed(false);
@@ -83,6 +89,7 @@ void BoxSwitchEffectConfig::save()
void BoxSwitchEffectConfig::defaults()
{
m_ui->opacitySpin->setValue( 25 );
+ m_ui->elevateBox->setChecked( true );
emit changed(true);
}
diff --git a/effects/boxswitch_config.ui b/effects/boxswitch_config.ui
index 98e61d317e..74ed118763 100644
--- a/effects/boxswitch_config.ui
+++ b/effects/boxswitch_config.ui
@@ -6,7 +6,7 @@
0
0
175
- 59
+ 86
@@ -53,8 +53,20 @@
+ -
+
+
+ &Elevate selected window
+
+
+
+
+ opacitySlider
+ opacitySpin
+ elevateBox
+