diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-11-20 07:43:26 (GMT) |
---|---|---|
committer | Thomas Lübking <thomas.luebking@gmail.com> | 2016-11-20 13:08:25 (GMT) |
commit | 3d7b466e7aff343dee152d4937d824d2860aac6b (patch) | |
tree | 08af9674bc83ccdf8e7a3154879ac1fb822987b5 /src/Window.cc | |
parent | e480255a7974cdc4b5cf0016169ed8347b2f431a (diff) | |
download | fluxbox-3d7b466e7aff343dee152d4937d824d2860aac6b.zip fluxbox-3d7b466e7aff343dee152d4937d824d2860aac6b.tar.bz2 |
delay repositioning of labels
The iconbuttons delay their update to cover multiple changes, so if the
labels are repositioned early, they'll operate on dated titles
BUG: 1155
On the run, centralize the delay value in IconButton::updateLaziness()
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc index 664c0a5..23c9789 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -449,6 +449,11 @@ void FluxboxWindow::init() { | |||
449 | m_tabActivationTimer.setCommand(activate_tab_cmd); | 449 | m_tabActivationTimer.setCommand(activate_tab_cmd); |
450 | m_tabActivationTimer.fireOnce(true); | 450 | m_tabActivationTimer.fireOnce(true); |
451 | 451 | ||
452 | m_reposLabels_timer.setTimeout(IconButton::updateLaziness()); | ||
453 | m_reposLabels_timer.fireOnce(true); | ||
454 | FbTk::RefCount<FbTk::Command<void> > elrs(new FbTk::SimpleCommand<FluxboxWindow>(*this, &FluxboxWindow::emitLabelReposSig)); | ||
455 | m_reposLabels_timer.setCommand(elrs); | ||
456 | |||
452 | /**************************************************/ | 457 | /**************************************************/ |
453 | /* Read state above here, apply state below here. */ | 458 | /* Read state above here, apply state below here. */ |
454 | /**************************************************/ | 459 | /**************************************************/ |
@@ -2851,6 +2856,10 @@ void FluxboxWindow::setTitle(const std::string& title, Focusable &client) { | |||
2851 | frame().setFocusTitle(title); | 2856 | frame().setFocusTitle(title); |
2852 | // relay title to others that display the focus title | 2857 | // relay title to others that display the focus title |
2853 | titleSig().emit(title, *this); | 2858 | titleSig().emit(title, *this); |
2859 | m_reposLabels_timer.start(); | ||
2860 | } | ||
2861 | |||
2862 | void FluxboxWindow::emitLabelReposSig() { | ||
2854 | frame().tabcontainer().repositionItems(); | 2863 | frame().tabcontainer().repositionItems(); |
2855 | } | 2864 | } |
2856 | 2865 | ||