]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
move the approproate code for map request handling to the client class. this will...
[chaz/openbox] / src / client.cc
index 2bb157806bce3ac5d26980e48958d68ea245bfab..a6990a8db5d792d5bafc62b5c6977d808222d569 100644 (file)
@@ -264,9 +264,10 @@ void OBClient::getState()
       if (state[i] == property->atom(otk::OBProperty::net_wm_state_modal))
         _modal = true;
       else if (state[i] ==
-               property->atom(otk::OBProperty::net_wm_state_shaded))
+               property->atom(otk::OBProperty::net_wm_state_shaded)) {
         _shaded = true;
-      else if (state[i] ==
+        _wmstate = IconicState;
+      } else if (state[i] ==
                property->atom(otk::OBProperty::net_wm_state_skip_taskbar))
         _skip_taskbar = true;
       else if (state[i] ==
@@ -1120,13 +1121,13 @@ void OBClient::configureRequestHandler(const XConfigureRequestEvent &e)
     switch (e.detail) {
     case Below:
     case BottomIf:
-      // XXX: lower the window
+      Openbox::instance->screen(_screen)->restack(false, this); // lower
       break;
 
     case Above:
     case TopIf:
     default:
-      // XXX: raise the window
+      Openbox::instance->screen(_screen)->restack(true, this); // raise
       break;
     }
   }
@@ -1186,4 +1187,17 @@ 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();
+}
+
 }
This page took 0.020994 seconds and 4 git commands to generate.