From 509022ea62fd9338704165881cbb29826a25db9e Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Tue, 16 Apr 2002 19:23:45 +0000 Subject: [PATCH] be less agressive in not stealing focus. This makes xv (among others) usable with KDE again svn path=/trunk/kdebase/kwin/; revision=149865 --- client.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client.cpp b/client.cpp index b40102fbb6..26a1fd5f3d 100644 --- a/client.cpp +++ b/client.cpp @@ -511,17 +511,17 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags moveResizeMode = FALSE; setMouseTracking( TRUE ); - + shaded = FALSE; hover_unshade = FALSE; - active = FALSE; + active = FALSE; is_sticky = FALSE; stays_on_top = FALSE; is_shape = FALSE; may_move = TRUE; is_fullscreen = FALSE; skip_taskbar = FALSE; - + Pdeletewindow = 0; Ptakefocus = 0; Pcontexthelp = 0; @@ -533,7 +533,7 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags transient_for_defined = FALSE; max_mode = MaximizeRestore; - + cmap = None; Window ww; @@ -856,8 +856,10 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial ) // window does not stem from a restored session. Client* ac = workspace()->activeClient(); + unsigned long usertime = 0; if ( !isTransient() && !session && ac && !ac->isDesktop() && - ac->userTime() > userTime() ) { + ac->resourceClass() != resourceClass() && + ( usertime = userTime() ) > 0 && ac->userTime() > usertime ) { workspace()->stackClientUnderActive( this ); show(); } else {