]> Dogcows Code - chaz/openbox/commitdiff
map and unmap work great now yay
authorDana Jansens <danakj@orodu.net>
Wed, 4 Dec 2002 01:29:01 +0000 (01:29 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 4 Dec 2002 01:29:01 +0000 (01:29 +0000)
otk/eventdispatcher.cc
src/client.cc
src/openbox.cc
src/rootwindow.cc
src/screen.cc

index 2a0c4448f59c045c604e75e1261b4c118d66f103..5be1c6b190aa77516c1c4b98b2d7f023c38e2798 100644 (file)
@@ -34,6 +34,7 @@ void OtkEventDispatcher::clearHandler(Window id)
   _map.erase(id);
 }
 
+#include <stdio.h>
 void OtkEventDispatcher::dispatchEvents(void)
 {
   XEvent e;
@@ -43,6 +44,10 @@ void OtkEventDispatcher::dispatchEvents(void)
   while (XPending(OBDisplay::display)) {
     XNextEvent(OBDisplay::display, &e);
 
+#ifdef DEBUG
+    printf("Event %d window %lx\n", e.type, e.xany.window);
+#endif
+
     it = _map.find(e.xany.window);
 
     if (it != _map.end())
index 4fc8ef976d6bd1217f37001c3ec69cb29cebe8b7..aef3dcbafe59287545e44203ee20cc35cf502285 100644 (file)
@@ -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
index 0c534a0f18df6f92018ecbca527bd46040a86a90..72c603f29ef492194856ab5533f988c38a2fcafa 100644 (file)
@@ -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);
index ff8a644fa648d4eb732273ae3b04d04ea5654761..a028ac81183b8ea8904e64d4a6ca3199e0973ba6 100644 (file)
@@ -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())->
index 01abd83c0c341a7f7deadf026bd7db5cda8d7d4b..22d5d1be43567f610c9ec08a546f0eaf38df70f3 100644 (file)
@@ -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());
   
This page took 0.03113 seconds and 4 git commands to generate.