diff options
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r-- | src/IconButton.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc index 4b0b423..d8205fb 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "IconbarTheme.hh" | 25 | #include "IconbarTheme.hh" |
26 | 26 | ||
27 | #include "Screen.hh" | 27 | #include "Screen.hh" |
28 | #include "Window.hh" | ||
28 | 29 | ||
29 | #include "FbTk/App.hh" | 30 | #include "FbTk/App.hh" |
30 | #include "FbTk/Command.hh" | 31 | #include "FbTk/Command.hh" |
@@ -58,6 +59,10 @@ IconButton::IconButton(const FbTk::FbWindow &parent, | |||
58 | m_signals.join(m_win.titleSig(), | 59 | m_signals.join(m_win.titleSig(), |
59 | MemFunIgnoreArgs(m_title_update_timer, &FbTk::Timer::start)); | 60 | MemFunIgnoreArgs(m_title_update_timer, &FbTk::Timer::start)); |
60 | 61 | ||
62 | if (m_win.fbwindow()) | ||
63 | m_signals.join(m_win.fbwindow()->stateSig(), | ||
64 | MemFunIgnoreArgs(*this, &IconButton::clientTitleChanged)); | ||
65 | |||
61 | m_signals.join(m_win.focusSig(), | 66 | m_signals.join(m_win.focusSig(), |
62 | MemFunIgnoreArgs(*this, &IconButton::reconfigAndClear)); | 67 | MemFunIgnoreArgs(*this, &IconButton::reconfigAndClear)); |
63 | 68 | ||
@@ -250,7 +255,10 @@ void IconButton::clientTitleChanged() { | |||
250 | 255 | ||
251 | void IconButton::setupWindow() { | 256 | void IconButton::setupWindow() { |
252 | m_icon_window.clear(); | 257 | m_icon_window.clear(); |
253 | setText(m_win.title()); | 258 | FbTk::FbString title = m_win.title().logical(); |
259 | if (m_win.fbwindow() && m_win.fbwindow()->isIconic()) | ||
260 | title = IconbarTool::iconifiedPrefix() + title + IconbarTool::iconifiedSuffix(); | ||
261 | setText(title); | ||
254 | FbTk::TextButton::clear(); | 262 | FbTk::TextButton::clear(); |
255 | } | 263 | } |
256 | 264 | ||