]> Dogcows Code - chaz/openbox/blobdiff - src/rootwindow.cc
ignore num/caps/scroll lock in events
[chaz/openbox] / src / rootwindow.cc
index 81b19ee16495e66e1c7b5964a3a4a376ea86daae..78017dd37ad4d92087844e8ff48615753348f132 100644 (file)
@@ -109,7 +109,20 @@ void OBRootWindow::mapRequestHandler(const XMapRequestEvent &e)
   printf("MapRequest for 0x%lx\n", e.window);
 #endif // DEBUG
 
-  Openbox::instance->screen(_info->screen())->manageWindow(e.window);
+  /*
+    MapRequest events come here even after the window exists instead of going
+    right to the client window, because of how they are sent and their struct
+    layout.
+  */
+  OBClient *c = Openbox::instance->findClient(e.window);
+
+  if (c) {
+    if (c->shaded())
+      c->shade(false);
+    // XXX: uniconify the window
+    c->focus();
+  } else
+    Openbox::instance->screen(_info->screen())->manageWindow(e.window);
 }
 
 }
This page took 0.025771 seconds and 4 git commands to generate.