From e048421030ae8ad38602aaa86cf53edc31fb0bd6 Mon Sep 17 00:00:00 2001 From: Matthias Elter Date: Sat, 13 Jan 2001 14:57:16 +0000 Subject: [PATCH] Workspace::activateClient does not flicker any more now. The problem was that when switching to a window on a different desktop via the taskbar setCurrentDesktop made a different window active for a second. svn path=/trunk/kdebase/kwin/; revision=77821 --- workspace.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index b41717500e..4e926cf18f 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1017,13 +1017,13 @@ void Workspace::setActiveClient( Client* c ) setActiveClient() and the operation is complete. This may not happen with certain focus policies, though. - \sa setActiveClient(), requestFocus() + \sa stActiveClient(), requestFocus() */ void Workspace::activateClient( Client* c, bool force ) { - if (!c->isOnDesktop(currentDesktop()) ) { - setCurrentDesktop( c->desktop() ); - } + //if (!c->isOnDesktop(currentDesktop()) ) { + // setCurrentDesktop( c->desktop() ); + //} raiseClient( c ); if ( c->isIconified() ) Events::raise( Events::DeIconify ); @@ -1032,6 +1032,10 @@ void Workspace::activateClient( Client* c, bool force ) if ( options->focusPolicyIsReasonable() ) { requestFocus( c, force ); } + + if (!c->isOnDesktop(currentDesktop()) ) { + setCurrentDesktop( c->desktop() ); + } } void Workspace::iconifyOrDeiconifyTransientsOf( Client* c )