summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/scale/src/scale.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/scale/src/scale.cpp b/plugins/scale/src/scale.cpp
index 4caa69f..f257135 100644
--- a/plugins/scale/src/scale.cpp
+++ b/plugins/scale/src/scale.cpp
@@ -1036,19 +1036,20 @@ PrivateScaleScreen::scaleInitiate (CompAction *action,
{
SCALE_SCREEN (::screen);
- if (ss->priv->state != ScaleScreen::Wait &&
- ss->priv->state != ScaleScreen::Out)
- {
- ss->priv->type = type;
- return ss->priv->scaleInitiateCommon (action, state, options);
- }
- else if (ss->priv->actionShouldToggle (action, state))
+ if (ss->priv->actionShouldToggle (action, state) &&
+ (ss->priv->state == ScaleScreen::Wait ||
+ ss->priv->state == ScaleScreen::Out))
{
if (ss->priv->type == type)
return scaleTerminate (action,
CompAction::StateCancel,
options);
}
+ else
+ {
+ ss->priv->type = type;
+ return ss->priv->scaleInitiateCommon (action, state, options);
+ }
}
return false;