summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moreau <oreaus@gmail.com>2011-05-27 00:40:14 -0600
committerScott Moreau <oreaus@gmail.com>2011-05-27 00:45:52 -0600
commita2d1c8e33b760257626f9989cfe7ac6e0be5cfe8 (patch)
tree37b198d628baf14e0593de8becfa2d04d3741fc6
parent4ddf181ab6e3ea1f9f83f5613bdeb36f3a69e082 (diff)
downloadopacify-a2d1c8e33b760257626f9989cfe7ac6e0be5cfe8.tar.gz
opacify-a2d1c8e33b760257626f9989cfe7ac6e0be5cfe8.tar.bz2
Reset timer on timeout option change.
-rw-r--r--src/opacify.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opacify.cpp b/src/opacify.cpp
index c87e200..f7600c3 100644
--- a/src/opacify.cpp
+++ b/src/opacify.cpp
@@ -362,6 +362,9 @@ OpacifyScreen::optionChanged (CompOption *option,
active = 0;
}
break;
+ case OpacifyOptions::Timeout:
+ timeoutHandle.setTimes (optionGetTimeout (), optionGetTimeout () * 1.2);
+ break;
default:
break;
}
@@ -413,6 +416,8 @@ OpacifyScreen::OpacifyScreen (CompScreen *screen) :
_2, _3));
optionSetInitToggleNotify (boost::bind (&OpacifyScreen::optionChanged,
this, _1, _2));
+ optionSetTimeoutNotify (boost::bind (&OpacifyScreen::optionChanged,
+ this, _1, _2));
screen->handleEventSetEnabled (this, optionGetInitToggle ());
}