From 09ca99c2921647498f416f490325d955c90b8b40 Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Thu, 13 May 2010 18:53:08 +0000 Subject: [PATCH] make kwin switch to a related activity if a window there is being activated. I'd prefer if it went to the "last active" one, but first I'd need to implement a way of knowing which one that was. svn path=/trunk/KDE/kdebase/workspace/; revision=1126339 --- activation.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/activation.cpp b/activation.cpp index eea49369e0..f89c311704 100644 --- a/activation.cpp +++ b/activation.cpp @@ -285,12 +285,19 @@ void Workspace::activateClient( Client* c, bool force ) return; } raiseClient( c ); - if (!c->isOnDesktop(currentDesktop()) ) + if (!c->isOnCurrentDesktop() ) { ++block_focus; setCurrentDesktop( c->desktop() ); --block_focus; } + if (!c->isOnCurrentActivity() ) + { + ++block_focus; + //DBUS! + activityController_.setCurrentActivity( c->activities().first() ); //first isn't necessarily best, but it's easiest + --block_focus; + } if( c->isMinimized()) c->unminimize(); @@ -764,7 +771,9 @@ Time Client::readUserTimeMapTimestamp( const KStartupInfoId* asn_id, const KStar bool session ) const { Time time = info->userTime(); - kDebug( 1212 ) << "User timestamp, initial:" << time; + //kDebug( 1212 ) << "User timestamp, initial:" << time; + //^^ this deadlocks kwin --replace sometimes. + // newer ASN timestamp always replaces user timestamp, unless user timestamp is 0 // helps e.g. with konqy reusing if( asn_data != NULL && time != 0 )