summaryrefslogtreecommitdiff
path: root/src/option.cpp
diff options
context:
space:
mode:
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)
{