diff options
author | Sam Spilsbury <smspillaz@gmail.com> | 2010-12-24 18:33:22 +0800 |
---|---|---|
committer | Sam Spilsbury <smspillaz@gmail.com> | 2010-12-24 18:33:22 +0800 |
commit | db817399062411314db9d4fbce40ab574b698bde (patch) | |
tree | 326f701e358df2003dd2c53220552c483e2fbe76 /plugins | |
parent | 009e39f01a7b3344ae6bfaff5d587158627532f5 (diff) | |
download | compiz-with-glib-mainloop-db817399062411314db9d4fbce40ab574b698bde.tar.gz compiz-with-glib-mainloop-db817399062411314db9d4fbce40ab574b698bde.tar.bz2 |
Allow plugins to initiate scale when initiated to change the match
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/scale/src/scale.cpp | 15 |
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; |