all repos — fluxbox @ 4308cf2e77422329eace2acc1c83707a26e80c15

custom fork of the fluxbox windowmanager

minor cleaning
fluxgen fluxgen
commit

4308cf2e77422329eace2acc1c83707a26e80c15

parent

fc9b134e5b673e07aa234379cbad4e5d3ea20672

1 files changed, 18 insertions(+), 3 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.186 2003/06/20 01:30:08 fluxgen Exp $ +// $Id: Screen.cc,v 1.187 2003/06/20 01:48:06 fluxgen Exp $ #include "Screen.hh"

@@ -523,6 +523,7 @@ Display *disp = FbTk::App::instance()->display();

initXinerama(); + // setup error handler to catch "screen already managed by other wm" XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning); rootWindow().setEventMask(ColormapChangeMask | EnterWindowMask | PropertyChangeMask |

@@ -550,11 +551,13 @@

rootWindow().setCursor(XCreateFontCursor(disp, XC_left_ptr)); Fluxbox *fluxbox = Fluxbox::instance(); + // setup image cache engine m_image_control.reset(new FbTk::ImageControl(scrn, true, fluxbox->colorsPerChannel(), fluxbox->getCacheLife(), fluxbox->getCacheMax())); imageControl().installRootColormap(); root_colormap_installed = true; + // load this screens resources fluxbox->load_rc(*this); FbTk::Menu::setAlpha(*resource.menu_alpha);

@@ -563,6 +566,7 @@ imageControl().setDither(*resource.image_dither);

// setup windowtheme, toolbartheme for antialias // before we load the theme + winFrameTheme().font().setAntialias(*resource.antialias); menuTheme()->titleFont().setAntialias(*resource.antialias); menuTheme()->frameFont().setAntialias(*resource.antialias);

@@ -570,6 +574,9 @@

// load database for theme engine FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename().c_str()); + + // create geometry window + const char *s = i18n->getMessage(FBNLS::ScreenSet, FBNLS::ScreenPositionLength, "W: 0000 x H: 0000");

@@ -590,6 +597,9 @@ geom_visible = false;

geom_pixmap = 0; renderGeomWindow(); + + + // setup workspaces and workspace menu workspacemenu.reset(createMenuFromScreen(*this)); workspacemenu->setInternalMenu();

@@ -608,16 +618,21 @@ m_workspaces_list.size());

m_workspaces_list.push_back(wkspc); } + setupWorkspacemenu(*this, *workspacemenu); + m_current_workspace = m_workspaces_list.front(); #ifdef SLIT m_slit.reset(new Slit(*this, *layerManager().getLayer(Fluxbox::instance()->getDesktopLayer()), Fluxbox::instance()->getSlitlistFilename().c_str())); + //!! TODO: we shouldn't do this more than once, but since slit handles it's own resources + // we must do this. + fluxbox->load_rc(*this); #endif // SLIT - m_toolbarhandler.reset(new ToolbarHandler(*this, toolbarMode())); + // create toolbarhandler for toolbar - setupWorkspacemenu(*this, *workspacemenu); + m_toolbarhandler.reset(new ToolbarHandler(*this, toolbarMode())); m_configmenu.reset(createMenuFromScreen(*this)); setupConfigmenu(*m_configmenu.get());