From a7dc6a68c91bafbc59e2239ef89e546831febcfd Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 9 Sep 2002 10:01:41 +0000 Subject: minor stuff --- src/Basemenu.cc | 11 +++++------ src/Workspace.cc | 12 ++++-------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/Basemenu.cc b/src/Basemenu.cc index 87c4bf6..2f7de99 100644 --- a/src/Basemenu.cc +++ b/src/Basemenu.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Basemenu.cc,v 1.28 2002/08/04 15:19:34 fluxgen Exp $ +// $Id: Basemenu.cc,v 1.29 2002/09/09 10:01:41 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -221,12 +221,11 @@ int Basemenu::insert(const char *label, Basemenu *submenu, int pos) { int Basemenu::remove(unsigned int index) { if (index >= menuitems.size()) { - #ifdef DEBUG +#ifdef DEBUG std::cout << "Bad index (" << index << ") given to Basemenu::remove()" - << " -- should be between 0 and " << menuitems.size()-1 - << " inclusive." - << std::endl; - #endif + << " -- should be between 0 and " << menuitems.size() + << " inclusive." << std::endl; +#endif // DEBUG return -1; } diff --git a/src/Workspace.cc b/src/Workspace.cc index 631fe69..d68e400 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Workspace.cc,v 1.27 2002/09/08 19:38:48 fluxgen Exp $ +// $Id: Workspace.cc,v 1.28 2002/09/09 10:00:24 fluxgen Exp $ #include "Workspace.hh" @@ -164,10 +164,10 @@ int Workspace::removeWindow(FluxboxWindow *w) { w->getTransientFor()->setInputFocus(); } else { FluxboxWindow *top = 0; - if (stackingList.size()!=0) + if (stackingList.size() != 0) top = stackingList.front(); - if (!top || !top->setInputFocus()) { + if (top == 0|| !top->setInputFocus()) { Fluxbox::instance()->setFocusedWindow(0); // set focused window to none XSetInputFocus(Fluxbox::instance()->getXDisplay(), screen->getToolbar()->getWindowID(), @@ -210,11 +210,7 @@ void Workspace::showAll(void) { WindowStack::iterator it = stackingList.begin(); WindowStack::iterator it_end = stackingList.end(); for (; it != it_end; ++it) { - if ((*it) == 0) { - stackingList.erase(it); - } else { - (*it)->deiconify(False, False); - } + (*it)->deiconify(false, false); } } -- cgit v0.11.2