diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-15 18:54:59 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-11-01 09:57:22 (GMT) |
commit | 79589fd99eaaa7a911f6146f21337c105f3ab446 (patch) | |
tree | b1dc18092a8bfdc57b8af434fb4398c8b1b955aa | |
parent | ea131baceb10b7f032da725e194c4f4b48586739 (diff) | |
download | fluxbox_pavel-79589fd99eaaa7a911f6146f21337c105f3ab446.zip fluxbox_pavel-79589fd99eaaa7a911f6146f21337c105f3ab446.tar.bz2 |
Attach modifiedSig handlers to the session.autoRaiseDelay resource
-rw-r--r-- | src/Toolbar.cc | 5 | ||||
-rw-r--r-- | src/Window.cc | 6 | ||||
-rw-r--r-- | src/fluxbox.hh | 3 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 1be8215..3919a19 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -219,7 +219,10 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::Layer &layer, size_t width): | |||
219 | frame.grab_x = frame.grab_y = 0; | 219 | frame.grab_x = frame.grab_y = 0; |
220 | 220 | ||
221 | // setup hide timer | 221 | // setup hide timer |
222 | m_hide_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay()); | 222 | m_hide_timer.setTimeout(*Fluxbox::instance()->getAutoRaiseDelayResource()); |
223 | m_signal_tracker.join(Fluxbox::instance()->getAutoRaiseDelayResource().modifiedSig(), | ||
224 | FbTk::MemFun(m_hide_timer, | ||
225 | static_cast<void (FbTk::Timer::*)(time_t)>(&FbTk::Timer::setTimeout) ) ); | ||
223 | FbTk::RefCount<FbTk::Command<void> > toggle_hidden(new FbTk::SimpleCommand<Toolbar>(*this, &Toolbar::toggleHidden)); | 226 | FbTk::RefCount<FbTk::Command<void> > toggle_hidden(new FbTk::SimpleCommand<Toolbar>(*this, &Toolbar::toggleHidden)); |
224 | m_hide_timer.setCommand(toggle_hidden); | 227 | m_hide_timer.setCommand(toggle_hidden); |
225 | m_hide_timer.fireOnce(true); | 228 | m_hide_timer.fireOnce(true); |
diff --git a/src/Window.cc b/src/Window.cc index 474f839..9974bc5 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -419,7 +419,9 @@ void FluxboxWindow::init() { | |||
419 | 419 | ||
420 | updateMWMHintsFromClient(*m_client); | 420 | updateMWMHintsFromClient(*m_client); |
421 | 421 | ||
422 | m_timer.setTimeout(fluxbox.getAutoRaiseDelay()); | 422 | m_timer.setTimeout(*fluxbox.getAutoRaiseDelayResource()); |
423 | join(fluxbox.getAutoRaiseDelayResource().modifiedSig(), FbTk::MemFun(m_timer, | ||
424 | static_cast<void (FbTk::Timer::*)(time_t)>(&FbTk::Timer::setTimeout) ) ); | ||
423 | FbTk::RefCount<FbTk::Command<void> > raise_cmd(new FbTk::SimpleCommand<FluxboxWindow>(*this, | 425 | FbTk::RefCount<FbTk::Command<void> > raise_cmd(new FbTk::SimpleCommand<FluxboxWindow>(*this, |
424 | &FluxboxWindow::raise)); | 426 | &FluxboxWindow::raise)); |
425 | m_timer.setCommand(raise_cmd); | 427 | m_timer.setCommand(raise_cmd); |
@@ -1053,8 +1055,6 @@ void FluxboxWindow::reconfigure() { | |||
1053 | 1055 | ||
1054 | moveResize(frame().x(), frame().y(), frame().width(), frame().height()); | 1056 | moveResize(frame().x(), frame().y(), frame().width(), frame().height()); |
1055 | 1057 | ||
1056 | m_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay()); | ||
1057 | |||
1058 | updateButtons(); | 1058 | updateButtons(); |
1059 | 1059 | ||
1060 | frame().reconfigure(); | 1060 | frame().reconfigure(); |
diff --git a/src/fluxbox.hh b/src/fluxbox.hh index 20b25fb..c25939d 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh | |||
@@ -127,7 +127,8 @@ public: | |||
127 | FbTk::IntResource &getTabsPaddingResource() { return m_rc_tabs_padding; } | 127 | FbTk::IntResource &getTabsPaddingResource() { return m_rc_tabs_padding; } |
128 | 128 | ||
129 | 129 | ||
130 | time_t getAutoRaiseDelay() const { return *m_rc_auto_raise_delay; } | 130 | FbTk::Resource<time_t, FbTk::IntTraits<time_t> > & |
131 | getAutoRaiseDelayResource() { return m_rc_auto_raise_delay; } | ||
131 | 132 | ||
132 | FbTk::UIntResource &getCacheLifeResource() { return m_rc_cache_life; } | 133 | FbTk::UIntResource &getCacheLifeResource() { return m_rc_cache_life; } |
133 | FbTk::UIntResource &getCacheMaxResource() { return m_rc_cache_max; } | 134 | FbTk::UIntResource &getCacheMaxResource() { return m_rc_cache_max; } |