X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fworkspace.cc;h=727708c655d8d8070ef03bb815dea439babf583b;hb=9247a7a616809e45bd26774d5aed7d24c618e6f2;hp=8c44adab946d6f2e017ebe1044ea73f251a64daf;hpb=db451d95bf97b8a8e995f031ac98da50606fd3a0;p=chaz%2Fopenbox diff --git a/src/workspace.cc b/src/workspace.cc index 8c44adab..727708c6 100644 --- a/src/workspace.cc +++ b/src/workspace.cc @@ -1,25 +1,4 @@ // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- -// Workspace.cc for Blackbox - an X11 Window manager -// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry -// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// 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. #ifdef HAVE_CONFIG_H # include "../config.h" @@ -46,15 +25,11 @@ extern "C" { using std::string; #include "blackbox.hh" -#include "clientmenu.hh" #include "font.hh" -#include "netizen.hh" #include "screen.hh" -#include "toolbar.hh" #include "util.hh" #include "window.hh" #include "workspace.hh" -#include "windowmenu.hh" #include "xatom.hh" @@ -69,8 +44,6 @@ Workspace::Workspace(BScreen *scrn, unsigned int i) { id = i; - clientmenu = new Clientmenu(this); - lastfocus = (BlackboxWindow *) 0; readName(); @@ -99,12 +72,6 @@ void Workspace::addWindow(BlackboxWindow *w, bool place, bool sticky) { windowList.push_back(w); - clientmenu->insert(w->getTitle()); - clientmenu->update(); - - if (! sticky) - screen->updateNetizenWindowAdd(w->getClientWindow(), id); - if (screen->doFocusNew() || (w->isTransient() && w->getTransientFor() && w->getTransientFor()->isFocused())) { if (id != screen->getCurrentWorkspaceID()) { @@ -146,12 +113,7 @@ void Workspace::removeWindow(BlackboxWindow *w, bool sticky) { assert(it != end); windowList.erase(it); - clientmenu->remove(i); - clientmenu->update(); - if (! sticky) { - screen->updateNetizenWindowDel(w->getClientWindow()); - BlackboxWindowList::iterator it = windowList.begin(); const BlackboxWindowList::iterator end = windowList.end(); unsigned int i = 0; @@ -213,19 +175,6 @@ void Workspace::focusFallback(const BlackboxWindow *old_window) { } -void Workspace::setFocused(const BlackboxWindow *w, bool focused) { - BlackboxWindowList::iterator it, end = windowList.end(); - int i; - for (i = 0, it = windowList.begin(); it != end; ++it, ++i) - if (*it == w) - break; - // if its == end, then a window thats not in the windowList - // got focused, such as a !isNormal() window. - if (it != end) - clientmenu->setItemSelected(i, focused); -} - - void Workspace::removeAll(void) { while (! windowList.empty()) windowList.front()->iconify(); @@ -296,7 +245,6 @@ void Workspace::raiseTransients(const BlackboxWindow * const win, for (it = win->getTransients().begin(); it != end; ++it) { BlackboxWindow *w = *it; *stack++ = w->getFrameWindow(); - screen->updateNetizenWindowRaise(w->getClientWindow()); if (! w->isIconic()) { Workspace *wkspc = screen->getWorkspace(w->getWorkspaceNumber()); @@ -325,7 +273,6 @@ void Workspace::lowerTransients(const BlackboxWindow * const win, for (it = win->getTransients().rbegin(); it != end; ++it) { BlackboxWindow *w = *it; *stack++ = w->getFrameWindow(); - screen->updateNetizenWindowLower(w->getClientWindow()); if (! w->isIconic()) { Workspace *wkspc = screen->getWorkspace(w->getWorkspaceNumber()); @@ -353,7 +300,6 @@ void Workspace::raiseWindow(BlackboxWindow *w) { StackVector::iterator stack = stack_vector.begin(); *(stack++) = win->getFrameWindow(); - screen->updateNetizenWindowRaise(win->getClientWindow()); if (! (win->isIconic() || win->isDesktop())) { Workspace *wkspc = screen->getWorkspace(win->getWorkspaceNumber()); wkspc->stackingList.remove(win); @@ -383,7 +329,6 @@ void Workspace::lowerWindow(BlackboxWindow *w) { lowerTransients(win, stack); *(stack++) = win->getFrameWindow(); - screen->updateNetizenWindowLower(win->getClientWindow()); if (! (win->isIconic() || win->isDesktop())) { Workspace *wkspc = screen->getWorkspace(win->getWorkspaceNumber()); wkspc->stackingList.remove(win); @@ -395,7 +340,6 @@ void Workspace::lowerWindow(BlackboxWindow *w) { void Workspace::reconfigure(void) { - clientmenu->reconfigure(); std::for_each(windowList.begin(), windowList.end(), std::mem_fun(&BlackboxWindow::reconfigure)); } @@ -445,14 +389,6 @@ BlackboxWindow* Workspace::getTopWindowOnStack(void) const { } -void Workspace::sendWindowList(Netizen &n) { - BlackboxWindowList::iterator it = windowList.begin(), - end = windowList.end(); - for(; it != end; ++it) - n.sendWindowAdd((*it)->getClientWindow(), getID()); -} - - unsigned int Workspace::getCount(void) const { return windowList.size(); } @@ -494,16 +430,13 @@ void Workspace::readName(void) { namesList.size() > id) { name = namesList[id]; - clientmenu->setLabel(name); - clientmenu->update(); } else { /* Use a default name. This doesn't actually change the class. That will happen after the setName changes the root property, and that change makes its way back to this function. */ - string tmp =i18n(WorkspaceSet, WorkspaceDefaultNameFormat, - "Workspace %d"); + string tmp = "Workspace %d"; assert(tmp.length() < 32); char default_name[32]; sprintf(default_name, tmp.c_str(), id + 1);