From 324dc14432e7dd534869148fc800964ff16fb668 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Fri, 1 Mar 2002 16:21:38 +0000 Subject: [PATCH] handle inner-application dialogs more safely svn path=/trunk/kdebase/kwin/; revision=139914 --- client.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/client.cpp b/client.cpp index 16718a4d3b..f4207eed60 100644 --- a/client.cpp +++ b/client.cpp @@ -833,20 +833,23 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial ) } else { // we only raise (and potentially activate) new clients if // the user does not actively work in the currently active - // client. We can safely drop the activation when the + // client. We can safely drop the activation when the new + // window is not a dialog of the active client and // NET_KDE_USER_TIME of the currently active client is // defined and more recent than the one of the new client // (which we set ourselves in CreateNotify in // workspace.cpp) Client* ac = workspace()->activeClient(); - if ( ac && ac->userTime() <= userTime() ) { + + if ( ac && ac->userTime() > userTime() + && ( !isTransient() || mainClient() != ac ) ) { + workspace()->stackClientUnderActive( this ); + show(); + } else { workspace()->raiseClient( this ); show(); if ( options->focusPolicyIsReasonable() && wantsTabFocus() ) workspace()->requestFocus( this ); - } else { - workspace()->stackClientUnderActive( this ); - show(); } } }