X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=aef3dcbafe59287545e44203ee20cc35cf502285;hb=301adc8bc20dff10093f3c0df44e30acbbddab67;hp=0fd5787b8669be2c2b92a88532731108089ccc4e;hpb=1fa445c88033e564a25d907a7f478e76bff9e89e;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index 0fd5787b..aef3dcba 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,35 @@ void OBClient::configureRequestHandler(const XConfigureRequestEvent &e) } +void OBClient::unmapHandler(const XUnmapEvent &e) +{ +#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 + 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); +} + + }