take advantage of the cached currentActivity

svn path=/trunk/KDE/kdebase/workspace/; revision=1126054
This commit is contained in:
Chani Armitage 2010-05-13 03:10:31 +00:00
parent 24e01d0e7b
commit 30313d2869
3 changed files with 3 additions and 4 deletions

View file

@ -51,7 +51,7 @@ include_directories(
add_subdirectory( lib )
add_subdirectory( killer )
add_subdirectory( kcmkwin )
#add_subdirectory( kcmkwin )
add_subdirectory( clients )
add_subdirectory( data )

View file

@ -1579,8 +1579,7 @@ void Client::setOnAllActivities( bool b )
activityList.clear();
//FIXME update transients
} else {
KActivityConsumer c;
setOnActivity(c.currentActivity(), true);
setOnActivity(Workspace::self()->currentActivity(), true);
//FIXME update transients
return;
}

View file

@ -1780,7 +1780,7 @@ void Workspace::toggleClientOnActivity( Client* c, const QString &activity, bool
if( c->isOnActivity(activity) == was_on_activity && c->isOnAllActivities() == was_on_all ) // No change
return;
if( c->isOnActivity( activityController_.currentActivity() ))
if( c->isOnCurrentActivity() )
{
if( c->wantsTabFocus() && options->focusPolicyIsReasonable() &&
!was_on_activity && // for stickyness changes