From 4c768d5d63154e416e1282396dc48492d0585d42 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 7 Jan 2003 04:51:55 +0000 Subject: use client messages to switch desktops/move windows between desktops --- src/screen.cc | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/screen.cc') 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) -- cgit v1.2.3