]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
grab the first known window type
[chaz/openbox] / src / client.cc
index b4015aae63227c877d492dffac86f4cb03d87799..01e9a56ccdf41a3f281aeebfb5a8f324f00b4b22 100644 (file)
@@ -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))
This page took 0.023942 seconds and 4 git commands to generate.