aboutsummaryrefslogtreecommitdiff
path: root/src/IconButton.cc
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2016-08-03 21:55:26 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2016-08-06 15:09:29 (GMT)
commit59d9b0703ba8efb24893528f2eb9c84aaa8f5f83 (patch)
tree30fd4de07fa1fdaaac4420c218e7fae3ff3a0382 /src/IconButton.cc
parenta8b0b3632b4ed6e6fb5f8aa26a6c0ef151a30144 (diff)
downloadfluxbox-59d9b0703ba8efb24893528f2eb9c84aaa8f5f83.zip
fluxbox-59d9b0703ba8efb24893528f2eb9c84aaa8f5f83.tar.bz2
delay title updates
Notably shells will cause brief interim titles when calling short-lived commands (try "ls"...) This covers such by waiting 100ms after every title update before reacting (the title will have returned in the mentioned cases, the UI remains steady)
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r--src/IconButton.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc
index d2bf4d3..4997365 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -51,8 +51,12 @@ IconButton::IconButton(const FbTk::FbWindow &parent,
51 m_theme(win, focused_theme, unfocused_theme), 51 m_theme(win, focused_theme, unfocused_theme),
52 m_pm(win.screen().imageControl()) { 52 m_pm(win.screen().imageControl()) {
53 53
54 m_title_update_timer.setTimeout(100 * FbTk::FbTime::IN_MILLISECONDS);
55 m_title_update_timer.fireOnce(true);
56 FbTk::RefCount<FbTk::Command<void> > ets(new FbTk::SimpleCommand<IconButton>(*this, &IconButton::clientTitleChanged));
57 m_title_update_timer.setCommand(ets);
54 m_signals.join(m_win.titleSig(), 58 m_signals.join(m_win.titleSig(),
55 MemFunIgnoreArgs(*this, &IconButton::clientTitleChanged)); 59 MemFunIgnoreArgs(m_title_update_timer, &FbTk::Timer::start));
56 60
57 m_signals.join(m_win.focusSig(), 61 m_signals.join(m_win.focusSig(),
58 MemFunIgnoreArgs(*this, &IconButton::reconfigAndClear)); 62 MemFunIgnoreArgs(*this, &IconButton::reconfigAndClear));