diff options
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r-- | src/WinClient.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc index b73f27c..22ee766 100644 --- a/src/WinClient.cc +++ b/src/WinClient.cc | |||
@@ -119,6 +119,11 @@ WinClient::WinClient(Window win, BScreen &screen, FluxboxWindow *fbwin): | |||
119 | s_transient_wait.erase(win); | 119 | s_transient_wait.erase(win); |
120 | } | 120 | } |
121 | 121 | ||
122 | m_title_update_timer.setTimeout(100 * FbTk::FbTime::IN_MILLISECONDS); | ||
123 | m_title_update_timer.fireOnce(true); | ||
124 | FbTk::RefCount<FbTk::Command<void> > ets(new FbTk::SimpleCommand<WinClient>(*this, &WinClient::emitTitleSig)); | ||
125 | m_title_update_timer.setCommand(ets); | ||
126 | |||
122 | // also check if this window is a transient | 127 | // also check if this window is a transient |
123 | // this needs to be done before creating an fbwindow, so this doesn't get | 128 | // this needs to be done before creating an fbwindow, so this doesn't get |
124 | // tabbed using the apps file | 129 | // tabbed using the apps file |
@@ -314,13 +319,17 @@ void WinClient::updateTitle() { | |||
314 | return; | 319 | return; |
315 | 320 | ||
316 | m_title.setLogical(FbTk::FbString(Xutil::getWMName(window()), 0, 512)); | 321 | m_title.setLogical(FbTk::FbString(Xutil::getWMName(window()), 0, 512)); |
322 | m_title_update_timer.start(); | ||
323 | } | ||
324 | |||
325 | void WinClient::emitTitleSig() { | ||
317 | titleSig().emit(m_title.logical(), *this); | 326 | titleSig().emit(m_title.logical(), *this); |
318 | } | 327 | } |
319 | 328 | ||
320 | void WinClient::setTitle(const FbTk::FbString &title) { | 329 | void WinClient::setTitle(const FbTk::FbString &title) { |
321 | m_title.setLogical(title); | 330 | m_title.setLogical(title); |
322 | m_title_override = true; | 331 | m_title_override = true; |
323 | titleSig().emit(m_title.logical(), *this); | 332 | m_title_update_timer.start(); |
324 | } | 333 | } |
325 | 334 | ||
326 | void WinClient::setIcon(const FbTk::PixmapWithMask& pm) { | 335 | void WinClient::setIcon(const FbTk::PixmapWithMask& pm) { |