X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=4fc8ef976d6bd1217f37001c3ec69cb29cebe8b7;hb=9860b76c50e5ecacc85921539058eab4c655c38d;hp=0fd5787b8669be2c2b92a88532731108089ccc4e;hpb=22bd294c7baed75a24b1df7cc423042c965acbdb;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index 0fd5787b..4fc8ef97 100644 --- a/src/client.cc +++ b/src/client.cc @@ -6,6 +6,7 @@ #include "client.hh" #include "frame.hh" +#include "screen.hh" #include "bbscreen.hh" #include "openbox.hh" #include "otk/display.hh" @@ -30,8 +31,6 @@ OBClient::OBClient(int screen, Window window) assert(screen >= 0); assert(window); - Openbox::instance->registerHandler(_window, this); - ignore_unmaps = 0; // update EVERYTHING the first time!! @@ -772,6 +771,8 @@ void OBClient::move(int x, int y) void OBClient::configureRequestHandler(const XConfigureRequestEvent &e) { + OtkEventHandler::configureRequestHandler(e); + // XXX: if we are iconic (or shaded? (fvwm does that)) ignore the event if (e.value_mask & CWBorderWidth) @@ -825,4 +826,30 @@ void OBClient::configureRequestHandler(const XConfigureRequestEvent &e) } +void OBClient::unmapHandler(const XUnmapEvent &e) +{ +#ifdef DEBUG + printf("UnmapNotify for 0x%lx\n", e.window); +#endif // DEBUG + + OtkEventHandler::unmapHandler(e); + + // this deletes us etc + Openbox::instance->screen(_screen)->unmanageWindow(this); +} + + +void OBClient::destroyHandler(const XDestroyWindowEvent &e) +{ +#ifdef DEBUG + printf("DestroyNotify for 0x%lx\n", e.window); +#endif // DEBUG + + OtkEventHandler::destroyHandler(e); + + // this deletes us etc + Openbox::instance->screen(_screen)->unmanageWindow(this); +} + + }