path: root/src/action.cpp
diff options
authorDanny Baumann <>2010-11-09 21:11:29 +0800
committerSam Spilsbury <>2010-11-09 21:13:21 +0800
commit267b9d12b6f8cc4218a761c2a7e92ca350b7f6a6 (patch)
treec51b378c2803b4edcf55e2ca507a56fb6be98e5d /src/action.cpp
parent46db42b1107f2ff3dd641ba3b5f8d18088a08bfb (diff)
[PATCH] Be a little bit more clever when handing option construction in handleActionEvent.
Previously we would have a static CompAction::Vector which we would resize to lower sizes (so that triggerFooBindings doesn't die) but this causes us to be reconstruction CompOptions all the time which is expensive. Instead just reset the option to make it "dead" (eg keep it in memory for longer) but don't create and recreate them all the time Also copy the active state of a CompAction on copy-construct
Diffstat (limited to 'src/action.cpp')
1 files changed, 2 insertions, 1 deletions
diff --git a/src/action.cpp b/src/action.cpp
index 2c97244..14153c4 100644
--- a/src/action.cpp
+++ b/src/action.cpp
@@ -648,7 +648,8 @@ PrivateAction::PrivateAction (const PrivateAction& a) :
key (a.key),
button (a.button),
bell (a.bell),
- edgeMask (a.edgeMask)
+ edgeMask (a.edgeMask),
+ active (
memcpy (&priv, &a.priv, sizeof (CompPrivate));