summaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index ddb09e2..3c30c14 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -514,6 +514,7 @@ void Fluxbox::initScreen(BScreen *screen) {
514 514
515 // attach screen signals to this 515 // attach screen signals to this
516 screen->currentWorkspaceSig().attach(this); 516 screen->currentWorkspaceSig().attach(this);
517 screen->focusedWindowSig().attach(this);
517 screen->workspaceCountSig().attach(this); 518 screen->workspaceCountSig().attach(this);
518 screen->workspaceNamesSig().attach(this); 519 screen->workspaceNamesSig().attach(this);
519 screen->workspaceAreaSig().attach(this); 520 screen->workspaceAreaSig().attach(this);
@@ -642,7 +643,7 @@ void Fluxbox::setupConfigFiles() {
642 if (create_init) 643 if (create_init)
643 FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str()); 644 FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str());
644 645
645#define CONFIG_VERSION 4 646#define CONFIG_VERSION 5
646 FbTk::Resource<int> config_version(m_resourcemanager, 0, 647 FbTk::Resource<int> config_version(m_resourcemanager, 0,
647 "session.configVersion", "Session.ConfigVersion"); 648 "session.configVersion", "Session.ConfigVersion");
648 if (*config_version < CONFIG_VERSION) { 649 if (*config_version < CONFIG_VERSION) {
@@ -1191,6 +1192,14 @@ void Fluxbox::update(FbTk::Subject *changedsub) {
1191 if ((*it).first->update()) 1192 if ((*it).first->update())
1192 (*it).first->updateCurrentWorkspace(screen); 1193 (*it).first->updateCurrentWorkspace(screen);
1193 } 1194 }
1195 } else if ((&(screen.focusedWindowSig())) == changedsub) {
1196 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1197 it != m_atomhandler.end(); it++) {
1198 (*it).first->updateFocusedWindow(screen,
1199 (FocusControl::focusedWindow() ?
1200 FocusControl::focusedWindow()->window() :
1201 0));
1202 }
1194 } else if ((&(screen.workspaceAreaSig())) == changedsub) { 1203 } else if ((&(screen.workspaceAreaSig())) == changedsub) {
1195 for (AtomHandlerContainerIt it= m_atomhandler.begin(); 1204 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1196 it != m_atomhandler.end(); ++it) { 1205 it != m_atomhandler.end(); ++it) {
@@ -1682,23 +1691,6 @@ bool Fluxbox::validateClient(const WinClient *client) const {
1682 return it != m_window_search.end(); 1691 return it != m_window_search.end();
1683} 1692}
1684 1693
1685void Fluxbox::updateFocusedWindow(BScreen *screen, BScreen *old_screen) {
1686 if (screen != 0) {
1687 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1688 it != m_atomhandler.end(); it++) {
1689 (*it).first->updateFocusedWindow(*screen, (FocusControl::focusedWindow() ?
1690 FocusControl::focusedWindow()->window() :
1691 0));
1692 }
1693 }
1694
1695 if (old_screen && old_screen != screen) {
1696 for (AtomHandlerContainerIt it= m_atomhandler.begin();
1697 it != m_atomhandler.end(); it++)
1698 (*it).first->updateFocusedWindow(*old_screen, 0);
1699 }
1700}
1701
1702void Fluxbox::updateFrameExtents(FluxboxWindow &win) { 1694void Fluxbox::updateFrameExtents(FluxboxWindow &win) {
1703 AtomHandlerContainerIt it = m_atomhandler.begin(); 1695 AtomHandlerContainerIt it = m_atomhandler.begin();
1704 AtomHandlerContainerIt it_end = m_atomhandler.end(); 1696 AtomHandlerContainerIt it_end = m_atomhandler.end();