X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=c0e63f2cb9c0ecd1c45d2c7c2e3741dd02303af9;hb=e9b48d2f1d532ddc236b23c69a8970eba7735f89;hp=34edff3e6e99444e9049006b4e4a3a41a0bbf451;hpb=34cd50ec5173e350b1d8b350fade2948c50113ee;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index 34edff3e..c0e63f2c 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); @@ -89,7 +93,7 @@ void OBClient::getDesktop() property->get(_window, otk::OBProperty::net_wm_desktop, otk::OBProperty::Atom_Cardinal, - &_desktop); + (long unsigned*)&_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; } @@ -1101,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); @@ -1116,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); @@ -1249,17 +1255,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(); -} - }