aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 9afbced..6155a72 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.cc,v 1.102 2003/03/01 07:30:42 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.103 2003/03/03 21:51:11 rathnor Exp $
26 26
27 27
28#include "fluxbox.hh" 28#include "fluxbox.hh"
@@ -447,7 +447,9 @@ Fluxbox::Fluxbox(int m_argc, char **m_argv, const char *dpy_name, const char *rc
447 continue; 447 continue;
448 } 448 }
449 screenList.push_back(screen); 449 screenList.push_back(screen);
450 450
451 m_atomhandler.push_back(&screen->getToolbarHandler());
452
451 // attach screen signals to this 453 // attach screen signals to this
452 screen->currentWorkspaceSig().attach(this); 454 screen->currentWorkspaceSig().attach(this);
453 screen->workspaceCountSig().attach(this); 455 screen->workspaceCountSig().attach(this);
@@ -1449,7 +1451,7 @@ void Fluxbox::handleSignal(int signum) {
1449 1451
1450void Fluxbox::update(FbTk::Subject *changedsub) { 1452void Fluxbox::update(FbTk::Subject *changedsub) {
1451//TODO: fix signaling, this does not look good 1453//TODO: fix signaling, this does not look good
1452 if (typeid(*changedsub) == typeid(FluxboxWindow)) { 1454 if (typeid(*changedsub) == typeid(FluxboxWindow::WinSubject)) {
1453 FluxboxWindow::WinSubject *winsub = dynamic_cast<FluxboxWindow::WinSubject *>(changedsub); 1455 FluxboxWindow::WinSubject *winsub = dynamic_cast<FluxboxWindow::WinSubject *>(changedsub);
1454 FluxboxWindow &win = winsub->win(); 1456 FluxboxWindow &win = winsub->win();
1455 if ((&(win.hintSig())) == changedsub) { // hint signal 1457 if ((&(win.hintSig())) == changedsub) { // hint signal
@@ -1476,6 +1478,14 @@ void Fluxbox::update(FbTk::Subject *changedsub) {
1476 if (m_atomhandler[i]->update()) 1478 if (m_atomhandler[i]->update())
1477 m_atomhandler[i]->updateLayer(win); 1479 m_atomhandler[i]->updateLayer(win);
1478 } 1480 }
1481 } else if ((&(win.dieSig())) == changedsub) { // window death signal
1482#ifdef DEBUG
1483 cerr<<__FILE__<<"("<<__LINE__<<") WINDOW die signal from "<<&win<<endl;
1484#endif // DEBUG
1485 for (size_t i=0; i<m_atomhandler.size(); ++i) {
1486 if (m_atomhandler[i]->update())
1487 m_atomhandler[i]->updateWindowClose(win);
1488 }
1479 } else if ((&(win.workspaceSig())) == changedsub) { // workspace signal 1489 } else if ((&(win.workspaceSig())) == changedsub) { // workspace signal
1480#ifdef DEBUG 1490#ifdef DEBUG
1481 cerr<<__FILE__<<"("<<__LINE__<<") WINDOW workspace signal from "<<&win<<endl; 1491 cerr<<__FILE__<<"("<<__LINE__<<") WINDOW workspace signal from "<<&win<<endl;
@@ -1534,6 +1544,7 @@ void Fluxbox::attachSignals(FluxboxWindow &win) {
1534 win.stateSig().attach(this); 1544 win.stateSig().attach(this);
1535 win.workspaceSig().attach(this); 1545 win.workspaceSig().attach(this);
1536 win.layerSig().attach(this); 1546 win.layerSig().attach(this);
1547 win.dieSig().attach(this);
1537 for (size_t i=0; i<m_atomhandler.size(); ++i) { 1548 for (size_t i=0; i<m_atomhandler.size(); ++i) {
1538 m_atomhandler[i]->setupWindow(win); 1549 m_atomhandler[i]->setupWindow(win);
1539 } 1550 }
@@ -2073,7 +2084,7 @@ void Fluxbox::load_rc(BScreen *screen) {
2073 if (screen->getToolbarWidthPercent() <= 0 || 2084 if (screen->getToolbarWidthPercent() <= 0 ||
2074 screen->getToolbarWidthPercent() > 100) 2085 screen->getToolbarWidthPercent() > 100)
2075 screen->saveToolbarWidthPercent(66); 2086 screen->saveToolbarWidthPercent(66);
2076 2087
2077 if (screen->getTabWidth()>512) 2088 if (screen->getTabWidth()>512)
2078 screen->saveTabWidth(512); 2089 screen->saveTabWidth(512);
2079 else if (screen->getTabWidth()<0) 2090 else if (screen->getTabWidth()<0)