From a0dbb0e13f19ac4cc2dddf3d94723174971df6d2 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 12 May 2002 01:23:48 +0000 Subject: couple of LinkedLists converted to STL lists in BScreen changed teh calls to XSetInputFocus. Using the root window as the fallback when there is nothing to focus instead of the toolbar. Also, always using 'RevertToPointerRoot' instead of sometimes 'RevertToParent' --- src/Workspace.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/Workspace.cc') diff --git a/src/Workspace.cc b/src/Workspace.cc index 4b9bb33b..256ad3da 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -115,14 +115,13 @@ const int Workspace::removeWindow(OpenboxWindow *w) { if (w->isTransient() && w->getTransientFor() && w->getTransientFor()->isVisible()) { w->getTransientFor()->setInputFocus(); - } else if (screen.sloppyFocus()) { - screen.getOpenbox().focusWindow((OpenboxWindow *) 0); } else { - if (_zorder.empty() || !_zorder.front()->setInputFocus()) { + if (screen.sloppyFocus() || // sloppy focus + _zorder.empty() || // click focus but no windows + !_zorder.front()->setInputFocus()) { // tried window, but wont focus screen.getOpenbox().focusWindow((OpenboxWindow *) 0); - XSetInputFocus(screen.getOpenbox().getXDisplay(), - screen.getToolbar()->getWindowID(), - RevertToParent, CurrentTime); + XSetInputFocus(screen.getOpenbox().getXDisplay(), + PointerRoot, None, CurrentTime); } } } @@ -319,7 +318,7 @@ void Workspace::setName(char *new_name) { void Workspace::shutdown(void) { while (!_windows.empty()) { _windows[0]->restore(); - _windows.erase(_windows.begin()); + delete _windows[0]; } } -- cgit v1.2.3