From b26fb7153583e1474b04e0a732245a19cc389ca9 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Sat, 8 Jul 2000 13:35:59 +0000 Subject: [PATCH] some focus problem svn path=/trunk/kdebase/kwin/; revision=55761 --- workspace.cpp | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index 5931ab2dbb..cb85f5614b 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -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