diff options
Diffstat (limited to 'src/AttentionNoticeHandler.cc')
-rw-r--r-- | src/AttentionNoticeHandler.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/AttentionNoticeHandler.cc b/src/AttentionNoticeHandler.cc index 88dd72a..9052319 100644 --- a/src/AttentionNoticeHandler.cc +++ b/src/AttentionNoticeHandler.cc | |||
@@ -88,9 +88,8 @@ void AttentionNoticeHandler::addAttention(Focusable &client) { | |||
88 | 88 | ||
89 | m_attentions[&client] = timer; | 89 | m_attentions[&client] = timer; |
90 | // attach signals that will make notice go away | 90 | // attach signals that will make notice go away |
91 | client.dieSig().attach(this); | 91 | join(client.dieSig(), MemFun(*this, &AttentionNoticeHandler::removeWindow)); |
92 | 92 | join(client.focusSig(), MemFun(*this, &AttentionNoticeHandler::windowFocusChanged)); | |
93 | client.focusSig().connect(MemFun(*this, &AttentionNoticeHandler::windowFocusChanged)); | ||
94 | 93 | ||
95 | // update _NET_WM_STATE atom | 94 | // update _NET_WM_STATE atom |
96 | if (client.fbwindow()) | 95 | if (client.fbwindow()) |
@@ -104,16 +103,6 @@ void AttentionNoticeHandler::removeWindow(Focusable& win) { | |||
104 | updateWindow(win, true); | 103 | updateWindow(win, true); |
105 | } | 104 | } |
106 | 105 | ||
107 | void AttentionNoticeHandler::update(FbTk::Subject* subj) { | ||
108 | // we need to be able to get the window | ||
109 | if (!subj || typeid(*subj) != typeid(Focusable::FocusSubject)) | ||
110 | return; | ||
111 | Focusable::FocusSubject *winsubj = | ||
112 | static_cast<Focusable::FocusSubject *>(subj); | ||
113 | |||
114 | removeWindow(winsubj->win()); | ||
115 | } | ||
116 | |||
117 | void AttentionNoticeHandler::updateWindow(Focusable& win, bool died) { | 106 | void AttentionNoticeHandler::updateWindow(Focusable& win, bool died) { |
118 | // all signals results in destruction of the notice | 107 | // all signals results in destruction of the notice |
119 | 108 | ||