X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=cdef1f94667b6f9c597783a97947e756965327f6;hb=55f138186097931f3bf81618e36d2ad53e0c07fd;hp=44e4d9eb550f691548532ac194a19dd9a96f492b;hpb=77ab46d1e35d48e73c201e6de88b26f48bb06425;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index 44e4d9eb..cdef1f94 100644 --- a/src/client.cc +++ b/src/client.cc @@ -74,6 +74,12 @@ Client::~Client() { const otk::Property *property = Openbox::instance->property(); + // clean up childrens' references + while (!_transients.empty()) { + _transients.front()->_transient_for = 0; + _transients.pop_front(); + } + // clean up parents reference to this if (_transient_for) _transient_for->_transients.remove(this); // remove from old parent @@ -525,15 +531,15 @@ void Client::updateClass() if (property->get(_window, otk::Property::wm_class, otk::Property::ascii, &num, &v)) { - if (num > 0) _app_name = v[0]; - if (num > 1) _app_class = v[1]; + if (num > 0) _app_name = v[0].c_str(); + if (num > 1) _app_class = v[1].c_str(); } v.clear(); num = 1; if (property->get(_window, otk::Property::wm_window_role, otk::Property::ascii, &num, &v)) { - if (num > 0) _role = v[0]; + if (num > 0) _role = v[0].c_str(); } }