aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authorHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-28 08:46:49 (GMT)
committerHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-28 08:46:49 (GMT)
commitbcf37890b617730cfded161b9a3d18f7c377e724 (patch)
treed17e0fe6ac69d023fba66fdc1d176c16174e6a1b /src/fluxbox.cc
parented53f3c623e7c3ae35672b33ae3b52759dc1a6ed (diff)
downloadfluxbox-bcf37890b617730cfded161b9a3d18f7c377e724.zip
fluxbox-bcf37890b617730cfded161b9a3d18f7c377e724.tar.bz2
Change focused signal to use the new signal system
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 3a07060..4041444 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -453,9 +453,11 @@ void Fluxbox::initScreen(BScreen *screen) {
453 screen->initWindows(); 453 screen->initWindows();
454 454
455 // attach screen signals to this 455 // attach screen signals to this
456 screen->focusedWindowSig().attach(this);
457 screen->workspaceAreaSig().attach(this); 456 screen->workspaceAreaSig().attach(this);
458 457
458 join(screen->focusedWindowSig(),
459 FbTk::MemFun(*this, &Fluxbox::focusedWindowChanged));
460
459 join(screen->clientListSig(), 461 join(screen->clientListSig(),
460 FbTk::MemFun(*this, &Fluxbox::clientListChanged)); 462 FbTk::MemFun(*this, &Fluxbox::clientListChanged));
461 463
@@ -1105,15 +1107,7 @@ void Fluxbox::update(FbTk::Subject *changedsub) {
1105 } else if (typeid(*changedsub) == typeid(BScreen::ScreenSubject)) { 1107 } else if (typeid(*changedsub) == typeid(BScreen::ScreenSubject)) {
1106 BScreen::ScreenSubject *subj = dynamic_cast<BScreen::ScreenSubject *>(changedsub); 1108 BScreen::ScreenSubject *subj = dynamic_cast<BScreen::ScreenSubject *>(changedsub);
1107 BScreen &screen = subj->screen(); 1109 BScreen &screen = subj->screen();
1108 if ((&(screen.focusedWindowSig())) == changedsub) { 1110 if ((&(screen.workspaceAreaSig())) == changedsub) {
1109 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1110 it != m_atomhandler.end(); it++) {
1111 (*it).first->updateFocusedWindow(screen,
1112 (FocusControl::focusedWindow() ?
1113 FocusControl::focusedWindow()->window() :
1114 0));
1115 }
1116 } else if ((&(screen.workspaceAreaSig())) == changedsub) {
1117 for (AtomHandlerContainerIt it= m_atomhandler.begin(); 1111 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1118 it != m_atomhandler.end(); ++it) { 1112 it != m_atomhandler.end(); ++it) {
1119 if ((*it).first->update()) 1113 if ((*it).first->update())
@@ -1537,3 +1531,12 @@ void Fluxbox::clientListChanged(BScreen &screen) {
1537 (*it).first->updateClientList(screen); 1531 (*it).first->updateClientList(screen);
1538 } 1532 }
1539} 1533}
1534
1535void Fluxbox::focusedWindowChanged(BScreen &screen,
1536 FluxboxWindow* win,
1537 WinClient* client) {
1538 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1539 it != m_atomhandler.end(); it++) {
1540 (*it).first->updateFocusedWindow(screen, client ? client->window() : 0 );
1541 }
1542}