aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-20 01:48:06 (GMT)
committerfluxgen <fluxgen>2003-06-20 01:48:06 (GMT)
commit4308cf2e77422329eace2acc1c83707a26e80c15 (patch)
tree1293d68909f7bc17e6542ebf64f57c81deb10685 /src/Screen.cc
parentfc9b134e5b673e07aa234379cbad4e5d3ea20672 (diff)
downloadfluxbox-4308cf2e77422329eace2acc1c83707a26e80c15.zip
fluxbox-4308cf2e77422329eace2acc1c83707a26e80c15.tar.bz2
minor cleaning
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index d508c5c..2e71dcf 100644
--- a/src/Screen.cc
+++ b/src/Screen.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: Screen.cc,v 1.186 2003/06/20 01:30:08 fluxgen Exp $ 25// $Id: Screen.cc,v 1.187 2003/06/20 01:48:06 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -523,6 +523,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
523 523
524 initXinerama(); 524 initXinerama();
525 525
526 // setup error handler to catch "screen already managed by other wm"
526 XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning); 527 XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning);
527 528
528 rootWindow().setEventMask(ColormapChangeMask | EnterWindowMask | PropertyChangeMask | 529 rootWindow().setEventMask(ColormapChangeMask | EnterWindowMask | PropertyChangeMask |
@@ -550,11 +551,13 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
550 rootWindow().setCursor(XCreateFontCursor(disp, XC_left_ptr)); 551 rootWindow().setCursor(XCreateFontCursor(disp, XC_left_ptr));
551 552
552 Fluxbox *fluxbox = Fluxbox::instance(); 553 Fluxbox *fluxbox = Fluxbox::instance();
554 // setup image cache engine
553 m_image_control.reset(new FbTk::ImageControl(scrn, true, fluxbox->colorsPerChannel(), 555 m_image_control.reset(new FbTk::ImageControl(scrn, true, fluxbox->colorsPerChannel(),
554 fluxbox->getCacheLife(), fluxbox->getCacheMax())); 556 fluxbox->getCacheLife(), fluxbox->getCacheMax()));
555 imageControl().installRootColormap(); 557 imageControl().installRootColormap();
556 root_colormap_installed = true; 558 root_colormap_installed = true;
557 559
560 // load this screens resources
558 fluxbox->load_rc(*this); 561 fluxbox->load_rc(*this);
559 562
560 FbTk::Menu::setAlpha(*resource.menu_alpha); 563 FbTk::Menu::setAlpha(*resource.menu_alpha);
@@ -563,6 +566,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
563 566
564 // setup windowtheme, toolbartheme for antialias 567 // setup windowtheme, toolbartheme for antialias
565 // before we load the theme 568 // before we load the theme
569
566 winFrameTheme().font().setAntialias(*resource.antialias); 570 winFrameTheme().font().setAntialias(*resource.antialias);
567 menuTheme()->titleFont().setAntialias(*resource.antialias); 571 menuTheme()->titleFont().setAntialias(*resource.antialias);
568 menuTheme()->frameFont().setAntialias(*resource.antialias); 572 menuTheme()->frameFont().setAntialias(*resource.antialias);
@@ -570,6 +574,9 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
570 // load database for theme engine 574 // load database for theme engine
571 FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename().c_str()); 575 FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename().c_str());
572 576
577
578 // create geometry window
579
573 const char *s = i18n->getMessage(FBNLS::ScreenSet, FBNLS::ScreenPositionLength, 580 const char *s = i18n->getMessage(FBNLS::ScreenSet, FBNLS::ScreenPositionLength,
574 "W: 0000 x H: 0000"); 581 "W: 0000 x H: 0000");
575 582
@@ -591,6 +598,9 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
591 598
592 renderGeomWindow(); 599 renderGeomWindow();
593 600
601
602 // setup workspaces and workspace menu
603
594 workspacemenu.reset(createMenuFromScreen(*this)); 604 workspacemenu.reset(createMenuFromScreen(*this));
595 workspacemenu->setInternalMenu(); 605 workspacemenu->setInternalMenu();
596 606
@@ -608,16 +618,21 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
608 m_workspaces_list.push_back(wkspc); 618 m_workspaces_list.push_back(wkspc);
609 } 619 }
610 620
621 setupWorkspacemenu(*this, *workspacemenu);
622
611 m_current_workspace = m_workspaces_list.front(); 623 m_current_workspace = m_workspaces_list.front();
612 624
613#ifdef SLIT 625#ifdef SLIT
614 m_slit.reset(new Slit(*this, *layerManager().getLayer(Fluxbox::instance()->getDesktopLayer()), 626 m_slit.reset(new Slit(*this, *layerManager().getLayer(Fluxbox::instance()->getDesktopLayer()),
615 Fluxbox::instance()->getSlitlistFilename().c_str())); 627 Fluxbox::instance()->getSlitlistFilename().c_str()));
628 //!! TODO: we shouldn't do this more than once, but since slit handles it's own resources
629 // we must do this.
630 fluxbox->load_rc(*this);
616#endif // SLIT 631#endif // SLIT
617 632
618 m_toolbarhandler.reset(new ToolbarHandler(*this, toolbarMode())); 633 // create toolbarhandler for toolbar
619 634
620 setupWorkspacemenu(*this, *workspacemenu); 635 m_toolbarhandler.reset(new ToolbarHandler(*this, toolbarMode()));
621 636
622 m_configmenu.reset(createMenuFromScreen(*this)); 637 m_configmenu.reset(createMenuFromScreen(*this));
623 setupConfigmenu(*m_configmenu.get()); 638 setupConfigmenu(*m_configmenu.get());