some focus problem

svn path=/trunk/kdebase/kwin/; revision=55761
icc-effect-5.14.5
Matthias Ettrich 2000-07-08 13:35:59 +00:00
parent ad1f6da5a2
commit b26fb71535
1 changed files with 18 additions and 20 deletions

View File

@ -1032,26 +1032,24 @@ void Workspace::requestFocus( Client* c)
*/
void Workspace::clientHidden( Client* c )
{
if ( c == active_client || ( !active_client && c == should_get_focus ) )
{
active_client = 0;
should_get_focus = 0;
if (!block_focus &&
options->focusPolicyIsReasonable() &&
!focus_chain.isEmpty()
)
{
for (ClientList::ConstIterator it = focus_chain.fromLast();
it != focus_chain.end();
--it)
{
if ((*it)->isVisible()) {
requestFocus(*it);
return;
}
}
}
}
if ( c != active_client && ( active_client || c != should_get_focus ) )
return;
active_client = 0;
should_get_focus = 0;
if (!block_focus &&
options->focusPolicyIsReasonable() &&
!focus_chain.isEmpty()
) {
for (ClientList::ConstIterator it = focus_chain.fromLast();
it != focus_chain.end();
--it) {
if ((*it)->isVisible()) {
requestFocus(*it);
return;
}
}
}
if ( desktop_client )
requestFocus( desktop_client );
else