aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authorHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-18 20:27:16 (GMT)
committerHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-18 20:27:16 (GMT)
commit2f4db57898920a3f17eaaa2586a39dad76d5c7e8 (patch)
treed107bebec3ddb8800970dfbc482c493d5e0187ab /src/fluxbox.cc
parente4d4717703b365bc14f189bf36b3edb1e4430b90 (diff)
downloadfluxbox-2f4db57898920a3f17eaaa2586a39dad76d5c7e8.zip
fluxbox-2f4db57898920a3f17eaaa2586a39dad76d5c7e8.tar.bz2
Changed workspace count signal in BScreen to use the new signal system.
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 4a223f9..4a7c68d 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -53,6 +53,7 @@
53#include "FbTk/Select2nd.hh" 53#include "FbTk/Select2nd.hh"
54#include "FbTk/Compose.hh" 54#include "FbTk/Compose.hh"
55#include "FbTk/KeyUtil.hh" 55#include "FbTk/KeyUtil.hh"
56#include "FbTk/MemFun.hh"
56 57
57//Use GNU extensions 58//Use GNU extensions
58#ifndef _GNU_SOURCE 59#ifndef _GNU_SOURCE
@@ -452,11 +453,13 @@ void Fluxbox::initScreen(BScreen *screen) {
452 // attach screen signals to this 453 // attach screen signals to this
453 screen->currentWorkspaceSig().attach(this); 454 screen->currentWorkspaceSig().attach(this);
454 screen->focusedWindowSig().attach(this); 455 screen->focusedWindowSig().attach(this);
455 screen->workspaceCountSig().attach(this);
456 screen->workspaceNamesSig().attach(this); 456 screen->workspaceNamesSig().attach(this);
457 screen->workspaceAreaSig().attach(this); 457 screen->workspaceAreaSig().attach(this);
458 screen->clientListSig().attach(this); 458 screen->clientListSig().attach(this);
459 459
460 join( screen->workspaceCountSig(),
461 FbTk::MemFun( *this, &Fluxbox::workspaceCountChanged ) );
462
460 // initiate atomhandler for screen specific stuff 463 // initiate atomhandler for screen specific stuff
461 for (AtomHandlerContainerIt it= m_atomhandler.begin(); 464 for (AtomHandlerContainerIt it= m_atomhandler.begin();
462 it != m_atomhandler.end(); 465 it != m_atomhandler.end();
@@ -1095,13 +1098,7 @@ void Fluxbox::update(FbTk::Subject *changedsub) {
1095 } else if (typeid(*changedsub) == typeid(BScreen::ScreenSubject)) { 1098 } else if (typeid(*changedsub) == typeid(BScreen::ScreenSubject)) {
1096 BScreen::ScreenSubject *subj = dynamic_cast<BScreen::ScreenSubject *>(changedsub); 1099 BScreen::ScreenSubject *subj = dynamic_cast<BScreen::ScreenSubject *>(changedsub);
1097 BScreen &screen = subj->screen(); 1100 BScreen &screen = subj->screen();
1098 if ((&(screen.workspaceCountSig())) == changedsub) { 1101 if ((&(screen.workspaceNamesSig())) == changedsub) {
1099 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1100 it != m_atomhandler.end(); ++it) {
1101 if ((*it).first->update())
1102 (*it).first->updateWorkspaceCount(screen);
1103 }
1104 } else if ((&(screen.workspaceNamesSig())) == changedsub) {
1105 for (AtomHandlerContainerIt it= m_atomhandler.begin(); 1102 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1106 it != m_atomhandler.end(); ++it) { 1103 it != m_atomhandler.end(); ++it) {
1107 if ((*it).first->update()) 1104 if ((*it).first->update())
@@ -1519,3 +1516,11 @@ void Fluxbox::updateFrameExtents(FluxboxWindow &win) {
1519 (*it).first->updateFrameExtents(win); 1516 (*it).first->updateFrameExtents(win);
1520 } 1517 }
1521} 1518}
1519
1520void Fluxbox::workspaceCountChanged( BScreen& screen ) {
1521 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1522 it != m_atomhandler.end(); ++it) {
1523 if ((*it).first->update())
1524 (*it).first->updateWorkspaceCount(screen);
1525 }
1526}