aboutsummaryrefslogtreecommitdiff
path: root/src/FocusableList.cc
diff options
context:
space:
mode:
authorHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-21 11:44:48 (GMT)
committerHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-21 11:44:48 (GMT)
commit86819abab91cf3ea20540278d00bad6a6b86d4b0 (patch)
treec8020d6015f3607a67730c6873a062fe29743356 /src/FocusableList.cc
parentf5113e2ec1743d76ac414a020f617917c7933bb7 (diff)
downloadfluxbox-86819abab91cf3ea20540278d00bad6a6b86d4b0.zip
fluxbox-86819abab91cf3ea20540278d00bad6a6b86d4b0.tar.bz2
Changed current workspace signal in BScreen to use the new signal system
Diffstat (limited to 'src/FocusableList.cc')
-rw-r--r--src/FocusableList.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/FocusableList.cc b/src/FocusableList.cc
index 094a9b5..b06faac 100644
--- a/src/FocusableList.cc
+++ b/src/FocusableList.cc
@@ -28,6 +28,7 @@
28#include "Window.hh" 28#include "Window.hh"
29 29
30#include "FbTk/StringUtil.hh" 30#include "FbTk/StringUtil.hh"
31#include "FbTk/MemFun.hh"
31 32
32#include <vector> 33#include <vector>
33 34
@@ -95,8 +96,10 @@ void FocusableList::init() {
95 m_parent->attachChild(*this); 96 m_parent->attachChild(*this);
96 97
97 // TODO: can't handle (head=[mouse]) yet 98 // TODO: can't handle (head=[mouse]) yet
98 if (m_pat->dependsOnCurrentWorkspace()) 99 if (m_pat->dependsOnCurrentWorkspace()) {
99 m_screen.currentWorkspaceSig().attach(this); 100 join(m_screen.currentWorkspaceSig(),
101 FbTk::MemFun(*this, &FocusableList::workspaceChanged));
102 }
100 if (m_pat->dependsOnFocusedWindow()) 103 if (m_pat->dependsOnFocusedWindow())
101 m_screen.focusedWindowSig().attach(this); 104 m_screen.focusedWindowSig().attach(this);
102} 105}
@@ -147,8 +150,7 @@ void FocusableList::update(FbTk::Subject *subj) {
147 if (insertFromParent(*win)) 150 if (insertFromParent(*win))
148 m_ordersig.notify(win); 151 m_ordersig.notify(win);
149 } 152 }
150 } else if (subj == &m_screen.currentWorkspaceSig() || 153 } else if (subj == &m_screen.focusedWindowSig())
151 subj == &m_screen.focusedWindowSig())
152 reset(); 154 reset();
153} 155}
154 156
@@ -309,3 +311,7 @@ void FocusableList::attachChild(FocusableList &child) const {
309 m_resetsig.attach(&child); 311 m_resetsig.attach(&child);
310 m_ordersig.attach(&child); 312 m_ordersig.attach(&child);
311} 313}
314
315void FocusableList::workspaceChanged(BScreen &screen) {
316 reset();
317}