X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FScreen.cc;h=bc1b9e65bfeca7e5f514a65c31088fa2833eacec;hb=f75083669f65aadd6b32f8ed25880ca362296a2f;hp=5e52e10eca4698c074f27e38e85a9db083dd7050;hpb=ebdf25bf6710c9cf585489302dcd8ca23b9b226a;p=chaz%2Fopenbox diff --git a/src/Screen.cc b/src/Screen.cc index 5e52e10e..bc1b9e65 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -225,6 +225,7 @@ BScreen::BScreen(Openbox &ob, int scrn, Resource &conf) : ScreenInfo(ob, scrn), slit = NULL; #endif // SLIT toolbar = NULL; + current_workspace = (Workspace *) 0; #ifdef HAVE_GETPID pid_t bpid = getpid(); @@ -483,9 +484,6 @@ BScreen::BScreen(Openbox &ob, int scrn, Resource &conf) : ScreenInfo(ob, scrn), } } - XSetInputFocus(getBaseDisplay().getXDisplay(), - PointerRoot, None, CurrentTime); - XFree(children); XFlush(getBaseDisplay().getXDisplay()); } @@ -585,7 +583,7 @@ Rect BScreen::availableArea() const { #ifdef SLIT int slit_x = slit->autoHide() ? slit->hiddenOrigin().x() : slit->area().x(), slit_y = slit->autoHide() ? slit->hiddenOrigin().y() : slit->area().y(); - int tbarh = resource.hide_toolbar ? 0 : + unsigned int tbarh = resource.hide_toolbar ? 0 : toolbar->getExposedHeight() + resource.border_width * 2; bool tbartop; switch (toolbar->placement()) { @@ -1838,7 +1836,7 @@ void BScreen::LoadStyle(void) { // load bevel, border and handle widths if (conf.getValue("handleWidth", "HandleWidth", l)) { - if (l <= size().w() / 2 && l != 0) + if (l <= (signed)size().w() / 2 && l != 0) resource.handle_width = l; else resource.handle_width = 6; @@ -1851,7 +1849,7 @@ void BScreen::LoadStyle(void) { resource.border_width = 1; if (conf.getValue("bevelWidth", "BevelWidth", l)) { - if (l <= size().w() / 2 && l != 0) + if (l <= (signed)size().w() / 2 && l != 0) resource.bevel_width = l; else resource.bevel_width = 3; @@ -1859,7 +1857,7 @@ void BScreen::LoadStyle(void) { resource.bevel_width = 3; if (conf.getValue("frameWidth", "FrameWidth", l)) { - if (l <= size().w() / 2) + if (l <= (signed)size().w() / 2) resource.frame_width = l; else resource.frame_width = resource.bevel_width; @@ -1914,7 +1912,7 @@ void BScreen::removeIcon(OpenboxWindow *w) { OpenboxWindow *BScreen::getIcon(int index) { - if (index < 0 || index >= iconList.size()) + if (index < 0 || index >= (signed)iconList.size()) return (OpenboxWindow *) 0; winList::iterator it = iconList.begin(); @@ -1981,8 +1979,7 @@ void BScreen::changeWorkspaceID(int id) { if (openbox.focusedWindow() && openbox.focusedWindow()->getScreen() == this && (! openbox.focusedWindow()->isStuck())) { - current_workspace->setLastFocusedWindow(openbox.focusedWindow()); - openbox.focusWindow((OpenboxWindow *) 0); + openbox.focusWindow(0); } current_workspace = getWorkspace(id); @@ -1993,9 +1990,9 @@ void BScreen::changeWorkspaceID(int id) { current_workspace->showAll(); - if (resource.focus_last && current_workspace->getLastFocusedWindow()) { + if (resource.focus_last && current_workspace->lastFocusedWindow()) { XSync(openbox.getXDisplay(), False); - current_workspace->getLastFocusedWindow()->setInputFocus(); + current_workspace->lastFocusedWindow()->setInputFocus(); } } @@ -2024,7 +2021,6 @@ void BScreen::addNetizen(Netizen *n) { void BScreen::removeNetizen(Window w) { netList::iterator it; - int i = 0; for (it = netizenList.begin(); it != netizenList.end(); ++it) if ((*it)->getWindowID() == w) { @@ -2150,7 +2146,7 @@ void BScreen::addWorkspaceName(const char *name) { const char *BScreen::getNameOfWorkspace(int id) { - if (id < 0 || id >= workspaceNames.size()) + if (id < 0 || id >= (signed)workspaceNames.size()) return (const char *) 0; return workspaceNames[id].c_str(); }