find modal children and focus them
This commit is contained in:
parent
d64505cfe2
commit
6cc8d62e26
1 changed files with 9 additions and 1 deletions
|
@ -1550,7 +1550,15 @@ void Client::disableDecorations(DecorationFlags flags)
|
||||||
|
|
||||||
bool Client::focusModalChild()
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue