map and unmap work great now yay
Dana Jansens danakj@orodu.net
5 files changed,
16 insertions(+),
0 deletions(-)
M
otk/eventdispatcher.cc
→
otk/eventdispatcher.cc
@@ -34,6 +34,7 @@ {
_map.erase(id); } +#include <stdio.h> void OtkEventDispatcher::dispatchEvents(void) { XEvent e;@@ -42,6 +43,10 @@ OtkEventMap::iterator it;
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);
M
src/client.cc
→
src/client.cc
@@ -832,6 +832,11 @@ #ifdef DEBUG
printf("UnmapNotify for 0x%lx\n", e.window); #endif // DEBUG + if (ignore_unmaps) { + ignore_unmaps--; + return; + } + OtkEventHandler::unmapHandler(e); // this deletes us etc
M
src/openbox.cc
→
src/openbox.cc
@@ -260,6 +260,7 @@
void Openbox::removeClient(Window window) { + _clients[window] = 0; ClientMap::iterator it = _clients.find(window); if (it != _clients.end()) _clients.erase(it);
M
src/rootwindow.cc
→
src/rootwindow.cc
@@ -100,7 +100,10 @@ #endif // DEBUG
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())->
M
src/screen.cc
→
src/screen.cc
@@ -387,6 +387,8 @@ OBFrame *frame = client->frame;
// 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());