summaryrefslogtreecommitdiff
path: root/src/Workspace.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-05-12 01:23:48 +0000
committerDana Jansens <danakj@orodu.net>2002-05-12 01:23:48 +0000
commita0dbb0e13f19ac4cc2dddf3d94723174971df6d2 (patch)
treed7bdf020048925d67a697fbd1d3efdb720cc9cc0 /src/Workspace.cc
parentf804f86c3eacc11091cbff2fa287799f925c2635 (diff)
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'
Diffstat (limited to 'src/Workspace.cc')
-rw-r--r--src/Workspace.cc13
1 files changed, 6 insertions, 7 deletions
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];
}
}