Fixed some activation stuff. When you get down to 1 window, it's

activated. This was really annoying me :)

svn path=/trunk/kdebase/kwin/; revision=50437
This commit is contained in:
Rik Hemsley 2000-05-23 14:55:50 +00:00
parent 7c426bc687
commit 452395b559

View file

@ -963,22 +963,32 @@ 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 ( clients.contains( c ) ) {
focus_chain.remove( c );
focus_chain.prepend( c );
}
if ( !block_focus && options->focusPolicyIsReasonable() ) {
for ( ClientList::ConstIterator it = focus_chain.fromLast(); it != focus_chain.begin(); --it) {
if ( (*it)->isVisible() ) {
requestFocus( *it );
break;
if ( c == active_client || ( !active_client && c == should_get_focus ) )
{
active_client = 0;
should_get_focus = 0;
if ( clients.contains( c ) ) {
focus_chain.remove( c );
focus_chain.prepend( c );
}
if (
!block_focus &&
options->focusPolicyIsReasonable() &&
!focus_chain.isEmpty()
)
{
ClientList::ConstIterator it = focus_chain.fromLast();
do {
if ((*it)->isVisible()) {
requestFocus(*it);
break;
}
it--;
} while (it != focus_chain.begin());
}
}
}
}
}