find modal children and focus them

This commit is contained in:
Dana Jansens 2003-02-03 08:51:44 +00:00
parent d64505cfe2
commit 6cc8d62e26

View 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;
}