summaryrefslogtreecommitdiff
path: root/src/option.cpp
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2008-12-22 14:17:10 +0100
committerDennis Kasprzyk <onestone@compiz-fusion.org>2008-12-22 14:17:10 +0100
commit3dec45fffae6f38a5f7822c2c098d14628a277bf (patch)
tree922c13c219408e41b4f82eb539cc8de6261e5755 /src/option.cpp
parent658c9f82bb0d51f69ae960e6b2e4e20488c93805 (diff)
downloadzcomp-3dec45fffae6f38a5f7822c2c098d14628a277bf.tar.gz
zcomp-3dec45fffae6f38a5f7822c2c098d14628a277bf.tar.bz2
Compare actions before grab setting.
Diffstat (limited to 'src/option.cpp')
-rw-r--r--src/option.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/option.cpp b/src/option.cpp
index dc51252..9739ab8 100644
--- a/src/option.cpp
+++ b/src/option.cpp
@@ -585,6 +585,15 @@ CompOption::rest ()
bool
CompOption::set (CompOption::Value &val)
{
+ if (priv->type == CompOption::TypeKey ||
+ priv->type == CompOption::TypeButton ||
+ priv->type == CompOption::TypeEdge ||
+ priv->type == CompOption::TypeBell)
+ val.action ().copyState (priv->value.action ());
+
+ if (priv->value == val)
+ return false;
+
if (isAction () &&
priv->value.action ().state () & CompAction::StateAutoGrab && screen)
{
@@ -597,15 +606,6 @@ CompOption::set (CompOption::Value &val)
screen->removeAction (&priv->value.action ());
}
}
-
- if (priv->type == CompOption::TypeKey ||
- priv->type == CompOption::TypeButton ||
- priv->type == CompOption::TypeEdge ||
- priv->type == CompOption::TypeBell)
- val.action ().copyState (priv->value.action ());
-
- if (priv->value == val)
- return false;
switch (priv->type)
{