summaryrefslogtreecommitdiff
path: root/src/screen.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-07 04:51:55 +0000
committerDana Jansens <danakj@orodu.net>2003-01-07 04:51:55 +0000
commit4c768d5d63154e416e1282396dc48492d0585d42 (patch)
tree879060f576e9ebea69ca924239e2b162e1cdc9c5 /src/screen.cc
parent85b0dc80cff679d964820159de018a6e89997184 (diff)
use client messages to switch desktops/move windows between desktops
Diffstat (limited to 'src/screen.cc')
-rw-r--r--src/screen.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/screen.cc b/src/screen.cc
index f9485595..49d63409 100644
--- a/src/screen.cc
+++ b/src/screen.cc
@@ -564,19 +564,9 @@ void OBScreen::unmanageWindow(OBClient *client)
// remove from the stacking order
_stacking.remove(client);
-
- // pass around focus if this window was focused XXX do this better!
- if (Openbox::instance->focusedClient() == client) {
- OBClient *newfocus = 0;
- OBClient::List::iterator it, end = _stacking.end();
- for (it = _stacking.begin(); it != end; ++it)
- if ((*it)->desktop() == _desktop && (*it)->normal() && (*it)->focus()) {
- newfocus = *it;
- break;
- }
- if (!newfocus)
- client->unfocus();
- }
+
+ // unfocus the client
+ client->unfocus();
// remove from the wm's map
Openbox::instance->removeClient(client->window());
@@ -669,6 +659,10 @@ void OBScreen::changeDesktop(long desktop)
(*it)->frame->show();
}
}
+
+ // if nothing is focused, force the callbacks to fire
+// if (!Openbox::instance->focusedClient())
+// Openbox::instance->setFocusedClient(0);
}
void OBScreen::changeNumDesktops(long num)