diff --git a/effects/wobblywindows.cpp b/effects/wobblywindows.cpp
index f06cb92dda..ebc10480e7 100644
--- a/effects/wobblywindows.cpp
+++ b/effects/wobblywindows.cpp
@@ -275,6 +275,9 @@ WobblyWindowsEffect::WobblyWindowsEffect()
m_closeEffectEnabled = conf.readEntry("CloseEffect", false);
}
+ m_moveWobble = conf.readEntry("MoveWobble", true);
+ m_resizeWobble = conf.readEntry("ResizeWobble", true);
+
#if defined VERBOSE_MODE
kDebug() << "Parameters :\n" <<
"move : " << m_moveEffectEnabled << ", open : " << m_openEffectEnabled << ", close : " << m_closeEffectEnabled << "\n"
@@ -442,7 +445,8 @@ void WobblyWindowsEffect::postPaintScreen()
void WobblyWindowsEffect::windowUserMovedResized(EffectWindow* w, bool first, bool last)
{
- if (m_moveEffectEnabled && first && !w->isSpecialWindow())
+ if (m_moveEffectEnabled && first && !w->isSpecialWindow() &&
+ ((w->isUserMove() && m_moveWobble) || (w->isUserResize() && m_resizeWobble)))
{
if (!windows.contains(w))
{
diff --git a/effects/wobblywindows.h b/effects/wobblywindows.h
index e5d5f3a0c7..d93a10775c 100644
--- a/effects/wobblywindows.h
+++ b/effects/wobblywindows.h
@@ -132,6 +132,9 @@ class WobblyWindowsEffect : public Effect
bool m_openEffectEnabled;
bool m_closeEffectEnabled;
+ bool m_moveWobble; // Expands m_moveEffectEnabled
+ bool m_resizeWobble;
+
void initWobblyInfo(WindowWobblyInfos& wwi, QRect geometry) const;
void freeWobblyInfo(WindowWobblyInfos& wwi) const;
void wobblyOpenInit(WindowWobblyInfos& wwi) const;
diff --git a/effects/wobblywindows_config.cpp b/effects/wobblywindows_config.cpp
index 0393af3b48..025a2b3f7c 100644
--- a/effects/wobblywindows_config.cpp
+++ b/effects/wobblywindows_config.cpp
@@ -40,6 +40,8 @@ KCModule(EffectFactory::componentData(), parent, args)
m_ui.setupUi(this);
connect(m_ui.slWobblyness, SIGNAL(valueChanged(int)), this, SLOT(slotSlWobblyness(int)));
+ connect(m_ui.moveBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
+ connect(m_ui.resizeBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
load();
}
@@ -71,6 +73,12 @@ void WobblyWindowsEffectConfig::load()
m_ui.slWobblyness->setSliderPosition(wobblynessLevel);
+ bool moving = conf.readEntry("MoveWobble", true);
+ m_ui.moveBox->setChecked(moving);
+
+ bool resizing = conf.readEntry("ResizeWobble", true);
+ m_ui.resizeBox->setChecked(resizing);
+
emit changed(change);
}
@@ -81,6 +89,9 @@ void WobblyWindowsEffectConfig::save()
conf.writeEntry("Settings", "Auto");
conf.writeEntry("WobblynessLevel", m_ui.slWobblyness->value());
+ conf.writeEntry("MoveWobble", m_ui.moveBox->isChecked());
+ conf.writeEntry("ResizeWobble", m_ui.resizeBox->isChecked());
+
emit changed(false);
EffectsHandler::sendReloadMessage("wobblywindows");
}
@@ -88,6 +99,8 @@ void WobblyWindowsEffectConfig::save()
void WobblyWindowsEffectConfig::defaults()
{
m_ui.slWobblyness->setSliderPosition(2);
+ m_ui.moveBox->setChecked( true );
+ m_ui.resizeBox->setChecked( true );
emit changed(true);
}
diff --git a/effects/wobblywindows_config.ui b/effects/wobblywindows_config.ui
index 3cd69cad7c..8de09a129b 100644
--- a/effects/wobblywindows_config.ui
+++ b/effects/wobblywindows_config.ui
@@ -5,8 +5,8 @@
0
0
- 274
- 66
+ 279
+ 113
@@ -58,21 +58,27 @@
- -
-
-
- Qt::Vertical
+
-
+
+
+ Wobble when &moving
-
-
- 20
- 4
-
+
+
+ -
+
+
+ Wobble when &resizing
-
+
+
+ slWobblyness
+ moveBox
+ resizeBox
+