]> Dogcows Code - chaz/openbox/blobdiff - src/client.cc
set the desktop number before the number of desktops
[chaz/openbox] / src / client.cc
index 296e2e52d32725d0451af8bd47045170b25fb623..2f8cfe8d7efb7dfb769c3e5cfeebc7f879824a1f 100644 (file)
@@ -1550,7 +1550,15 @@ void Client::disableDecorations(DecorationFlags flags)
 
 bool Client::focusModalChild()
 {
-  // XXX: find a modal child recursively and try focus it
+  // find a modal child recursively and try focus it
+  List::iterator it, end = _transients.end();
+  for (it = _transients.begin(); it != end; ++it)
+    if ((*it)->focusModalChild())
+      return true; // got one
+  // none of our grand-children are modal, try our direct children
+  for (it = _transients.begin(); it != end; ++it)
+    if ((*it)->modal() && (*it)->focus())
+      return true; // got one
   return false;
 }
 
This page took 0.024261 seconds and 4 git commands to generate.