summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client.cc5
-rw-r--r--src/openbox.cc1
-rw-r--r--src/rootwindow.cc3
-rw-r--r--src/screen.cc2
4 files changed, 11 insertions, 0 deletions
diff --git a/src/client.cc b/src/client.cc
index 4fc8ef97..aef3dcba 100644
--- a/src/client.cc
+++ b/src/client.cc
@@ -832,6 +832,11 @@ void OBClient::unmapHandler(const XUnmapEvent &e)
printf("UnmapNotify for 0x%lx\n", e.window);
#endif // DEBUG
+ if (ignore_unmaps) {
+ ignore_unmaps--;
+ return;
+ }
+
OtkEventHandler::unmapHandler(e);
// this deletes us etc
diff --git a/src/openbox.cc b/src/openbox.cc
index 0c534a0f..72c603f2 100644
--- a/src/openbox.cc
+++ b/src/openbox.cc
@@ -260,6 +260,7 @@ void Openbox::addClient(Window window, OBClient *client)
void Openbox::removeClient(Window window)
{
+ _clients[window] = 0;
ClientMap::iterator it = _clients.find(window);
if (it != _clients.end())
_clients.erase(it);
diff --git a/src/rootwindow.cc b/src/rootwindow.cc
index ff8a644f..a028ac81 100644
--- a/src/rootwindow.cc
+++ b/src/rootwindow.cc
@@ -100,7 +100,10 @@ void OBRootWindow::mapRequestHandler(const XMapRequestEvent &e)
OBClient *client = Openbox::instance->findClient(e.window);
+ printf("Client: %lx\n", client);
+
if (client) {
+ printf("found client\n");
// XXX: uniconify and/or unshade the window
} else {
Openbox::instance->screen(_info->getScreenNumber())->
diff --git a/src/screen.cc b/src/screen.cc
index 01abd83c..22d5d1be 100644
--- a/src/screen.cc
+++ b/src/screen.cc
@@ -387,6 +387,8 @@ void OBScreen::unmanageWindow(OBClient *client)
// XXX: pass around focus if this window was focused
+ // remove from the wm's map
+ Openbox::instance->removeClient(client->window());
// unregister for handling events
Openbox::instance->clearHandler(client->window());