]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
update children first
[chaz/openbox] / src / client.cc
index 51c987d3a83633edb7cb39224281a66bc0b6545b..d42a962a8f9bcca3f05a212a4633f9b557c08394 100644 (file)
@@ -39,33 +39,27 @@ Client::Client(int screen, Window window)
   
   // update EVERYTHING the first time!!
 
-  // we default to NormalState, visible
+  // defaults
   _wmstate = NormalState;
-  // start unfocused
   _focused = false;
-  // not a transient by default of course
   _transient_for = 0;
-  // pick a layer to start from
   _layer = Layer_Normal;
-  // default to not urgent
   _urgent = false;
-  // not positioned unless specified
   _positioned = false;
-  // nothing is disabled unless specified
   _disabled_decorations = 0;
-  // no modal children until they set themselves
   _modal_child = 0;
+  _group = None;
+  _desktop = 0;
   
   getArea();
   getDesktop();
+  getState();  // do this before updateTransientFor! (for _modal)
+  getShaped();
 
   updateTransientFor();
   getMwmHints();
   getType(); // this can change the mwmhints for special cases
 
-  getState();
-  getShaped();
-
   updateProtocols();
 
   getGravity();        // get the attribute gravity
@@ -1098,9 +1092,16 @@ void Client::clientMessageHandler(const XClientMessageEvent &e)
       setDesktop(openbox->screen(_screen)->desktop());
     if (_shaded)
       shade(false);
-    // XXX: deiconify
     focus();
     openbox->screen(_screen)->raiseWindow(this);
+  } else if (e.message_type == otk::Property::atoms.openbox_active_window) {
+    if (_iconic)
+      setDesktop(openbox->screen(_screen)->desktop());
+    if (e.data.l[0] && _shaded)
+      shade(false);
+    focus();
+    if (e.data.l[1])
+      openbox->screen(_screen)->raiseWindow(this);
   }
 }
 
@@ -1620,7 +1621,6 @@ void Client::installColormap(bool install) const
 {
   XWindowAttributes wa;
   if (XGetWindowAttributes(**otk::display, _window, &wa)) {
-    printf("%snstalling Window Colormap 0x%lx!\n", install ? "I" : "Uni", _window);
     if (install)
       XInstallColormap(**otk::display, wa.colormap);
     else
This page took 0.021167 seconds and 4 git commands to generate.