aboutsummaryrefslogtreecommitdiff
path: root/src/AttentionNoticeHandler.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-04-07 17:39:27 (GMT)
committermarkt <markt>2007-04-07 17:39:27 (GMT)
commit12a8b3c038c9ccb577c699d41a1d19602132a7a8 (patch)
tree2a23392db366c10c8b6f7ee444ee8ac578010b5c /src/AttentionNoticeHandler.cc
parent416578138e899f817b875ad55a5252a19aa6cb07 (diff)
downloadfluxbox-12a8b3c038c9ccb577c699d41a1d19602132a7a8.zip
fluxbox-12a8b3c038c9ccb577c699d41a1d19602132a7a8.tar.bz2
more of the same
Diffstat (limited to 'src/AttentionNoticeHandler.cc')
-rw-r--r--src/AttentionNoticeHandler.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/AttentionNoticeHandler.cc b/src/AttentionNoticeHandler.cc
index 02fa95c..c2599c9 100644
--- a/src/AttentionNoticeHandler.cc
+++ b/src/AttentionNoticeHandler.cc
@@ -23,7 +23,7 @@
23 23
24#include "AttentionNoticeHandler.hh" 24#include "AttentionNoticeHandler.hh"
25 25
26#include "WinClient.hh" 26#include "Focusable.hh"
27#include "Screen.hh" 27#include "Screen.hh"
28#include "STLUtil.hh" 28#include "STLUtil.hh"
29 29
@@ -34,16 +34,15 @@
34namespace { 34namespace {
35class ToggleFrameFocusCmd: public FbTk::Command { 35class ToggleFrameFocusCmd: public FbTk::Command {
36public: 36public:
37 ToggleFrameFocusCmd(WinClient &client): 37 ToggleFrameFocusCmd(Focusable &client):
38 m_client(client), 38 m_client(client),
39 m_state(false) {} 39 m_state(false) {}
40 void execute() { 40 void execute() {
41 m_state ^= true; 41 m_state ^= true;
42 m_client.fbwindow()->setLabelButtonFocus(m_client, m_state); 42 m_client.setAttentionState(m_state);
43 m_client.fbwindow()->setAttentionState(m_state);
44 } 43 }
45private: 44private:
46 WinClient& m_client; 45 Focusable &m_client;
47 bool m_state; 46 bool m_state;
48}; 47};
49 48
@@ -54,9 +53,9 @@ AttentionNoticeHandler::~AttentionNoticeHandler() {
54 STLUtil::destroyAndClearSecond(m_attentions); 53 STLUtil::destroyAndClearSecond(m_attentions);
55} 54}
56 55
57void AttentionNoticeHandler::addAttention(WinClient &client) { 56void AttentionNoticeHandler::addAttention(Focusable &client) {
58 // no need to add already active client 57 // no need to add already active client
59 if (client.fbwindow()->isFocused() && &client.fbwindow()->winClient() == &client) 58 if (client.isFocused())
60 return; 59 return;
61 60
62 // Already have a notice for it? 61 // Already have a notice for it?
@@ -105,5 +104,6 @@ void AttentionNoticeHandler::update(FbTk::Subject *subj) {
105 static_cast<Focusable::FocusSubject *>(subj); 104 static_cast<Focusable::FocusSubject *>(subj);
106 delete m_attentions[&winsubj->win()]; 105 delete m_attentions[&winsubj->win()];
107 m_attentions.erase(&winsubj->win()); 106 m_attentions.erase(&winsubj->win());
107 winsubj->win().setAttentionState(false);
108} 108}
109 109