diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-09-09 10:47:38 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-09-09 10:47:38 (GMT) |
commit | e68511794130388ab9668fdef0dcf48dbbf002fd (patch) | |
tree | 94f5ad86689e8fd1ffc62864a99c4c76fe1e8cbe /src/AttentionNoticeHandler.cc | |
parent | 82d0de9ef46d38288d2f1daa77ac18276d57390f (diff) | |
download | fluxbox-e68511794130388ab9668fdef0dcf48dbbf002fd.zip fluxbox-e68511794130388ab9668fdef0dcf48dbbf002fd.tar.bz2 |
simpler to use FbTk/Timer api
Diffstat (limited to 'src/AttentionNoticeHandler.cc')
-rw-r--r-- | src/AttentionNoticeHandler.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/AttentionNoticeHandler.cc b/src/AttentionNoticeHandler.cc index 393e566..9425bb2 100644 --- a/src/AttentionNoticeHandler.cc +++ b/src/AttentionNoticeHandler.cc | |||
@@ -78,14 +78,11 @@ void AttentionNoticeHandler::addAttention(Focusable &client) { | |||
78 | if (**timeout_res == 0) | 78 | if (**timeout_res == 0) |
79 | return; | 79 | return; |
80 | 80 | ||
81 | Timer *timer = new Timer(); | ||
82 | // setup timer | 81 | // setup timer |
83 | timeval timeout; | ||
84 | timeout.tv_sec = 0; | ||
85 | timeout.tv_usec = **timeout_res * 1000; | ||
86 | RefCount<Command<void> > cmd(new ToggleFrameFocusCmd(client)); | 82 | RefCount<Command<void> > cmd(new ToggleFrameFocusCmd(client)); |
83 | Timer *timer = new Timer(); | ||
87 | timer->setCommand(cmd); | 84 | timer->setCommand(cmd); |
88 | timer->setTimeout(timeout); | 85 | timer->setTimeout(0, **timeout_res * 1000); |
89 | timer->fireOnce(false); // will repeat until window has focus | 86 | timer->fireOnce(false); // will repeat until window has focus |
90 | timer->start(); | 87 | timer->start(); |
91 | 88 | ||