X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=23de426a3bf13f39f12440ba8b5dc8d1e94b120c;hb=cc39863363f6c424a1d5f3790ef182b52b69a53e;hp=b4015aae63227c877d492dffac86f4cb03d87799;hpb=a93f06f5b3162e59c04074a14bd3702e4bb82133;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index b4015aae..23de426a 100644 --- a/src/client.cc +++ b/src/client.cc @@ -72,6 +72,10 @@ OBClient::~OBClient() { const otk::OBProperty *property = Openbox::instance->property(); + // clean up parents reference to this + if (_transient_for) + _transient_for->_transients.remove(this); // remove from old parent + if (Openbox::instance->state() != Openbox::State_Exiting) { // these values should not be persisted across a window unmapping/mapping property->erase(_window, otk::OBProperty::net_wm_desktop); @@ -134,6 +138,8 @@ void OBClient::getType() // property->atom(otk::OBProperty::kde_net_wm_window_type_override)) // mwm_decorations = 0; // prevent this window from getting any decor // XXX: make this work again + if (_type != (WindowType) -1) + break; // grab the first known type } delete val; } @@ -237,7 +243,7 @@ void OBClient::getMwmHints() (unsigned long **)&hints)) return; - if (num == MwmHints::elements) { + if (num >= MwmHints::elements) { // retrieved the hints _mwmhints.flags = hints[0]; _mwmhints.functions = hints[1]; @@ -608,6 +614,7 @@ void OBClient::propertyHandler(const XPropertyEvent &e) getType(); calcLayer(); // type may have changed, so update the layer setupDecorAndFunctions(); + frame->adjustSize(); // this updates the frame for any new decor settings } else if (e.atom == property->atom(otk::OBProperty::net_wm_name) || e.atom == property->atom(otk::OBProperty::wm_name)) @@ -1100,7 +1107,7 @@ void OBClient::unfocus() void OBClient::focusHandler(const XFocusChangeEvent &e) { #ifdef DEBUG - printf("FocusIn for 0x%lx\n", e.window); +// printf("FocusIn for 0x%lx\n", e.window); #endif // DEBUG OtkEventHandler::focusHandler(e); @@ -1115,7 +1122,7 @@ void OBClient::focusHandler(const XFocusChangeEvent &e) void OBClient::unfocusHandler(const XFocusChangeEvent &e) { #ifdef DEBUG - printf("FocusOut for 0x%lx\n", e.window); +// printf("FocusOut for 0x%lx\n", e.window); #endif // DEBUG OtkEventHandler::unfocusHandler(e); @@ -1229,7 +1236,10 @@ void OBClient::destroyHandler(const XDestroyWindowEvent &e) void OBClient::reparentHandler(const XReparentEvent &e) { // this is when the client is first taken captive in the frame - if (e.parent == frame->plate()) return; + if (e.parent == frame->plate()) { + printf("Ignored ReparentNotify for 0x%lx\n", e.window); + return; + } #ifdef DEBUG printf("ReparentNotify for 0x%lx\n", e.window); @@ -1248,17 +1258,4 @@ void OBClient::reparentHandler(const XReparentEvent &e) Openbox::instance->screen(_screen)->unmanageWindow(this); } - -void OBClient::mapRequestHandler(const XMapRequestEvent &e) -{ - printf("\nMAP REQUEST\n\n"); - - otk::OtkEventHandler::mapRequestHandler(e); - - if (_shaded) - shade(false); - // XXX: uniconify the window - focus(); -} - }