diff options
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 23 |
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 | |||
1535 | void 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 | } | ||