update activity of transients properly

svn path=/trunk/KDE/kdebase/workspace/; revision=1128655
icc-effect-5.14.5
Chani Armitage 2010-05-19 21:02:40 +00:00
parent 3807c33523
commit 24c7f96416
4 changed files with 18 additions and 3 deletions

View File

@ -1579,12 +1579,12 @@ void Client::setOnAllActivities( bool on )
if( on ) if( on )
{ {
activityList.clear(); activityList.clear();
//FIXME update transients workspace()->updateOnAllActivitiesOfTransients( this );
} }
else else
{ {
setOnActivity(Workspace::self()->currentActivity(), true); setOnActivity(Workspace::self()->currentActivity(), true);
//FIXME update transients workspace()->updateOnAllActivitiesOfTransients( this );
return; return;
} }

View File

@ -433,6 +433,20 @@ void Workspace::updateOnAllDesktopsOfTransients( Client* c )
} }
} }
/*!
Sets the client \a c's transient windows' on_all_activities property to \a on_all_desktops.
*/
void Workspace::updateOnAllActivitiesOfTransients( Client* c )
{
for( ClientList::ConstIterator it = c->transients().constBegin();
it != c->transients().constEnd();
++it)
{
if( (*it)->isOnAllActivities() != c->isOnAllActivities())
(*it)->setOnAllActivities( c->isOnAllActivities());
}
}
// A new window has been mapped. Check if it's not a mainwindow for some already existing transient window. // A new window has been mapped. Check if it's not a mainwindow for some already existing transient window.
void Workspace::checkTransients( Window w ) void Workspace::checkTransients( Window w )
{ {

View File

@ -1778,7 +1778,7 @@ void Workspace::sendClientToDesktop( Client* c, int desk, bool dont_activate )
} }
/** /**
* Adds/removes client \a c to/from \a desk. * Adds/removes client \a c to/from \a activity.
* *
* Takes care of transients as well. * Takes care of transients as well.
*/ */

View File

@ -410,6 +410,7 @@ class Workspace : public QObject, public KDecorationDefines
void updateMinimizedOfTransients( Client* ); void updateMinimizedOfTransients( Client* );
void updateOnAllDesktopsOfTransients( Client* ); void updateOnAllDesktopsOfTransients( Client* );
void updateOnAllActivitiesOfTransients( Client* );
void checkTransients( Window w ); void checkTransients( Window w );
void performWindowOperation( Client* c, WindowOperation op ); void performWindowOperation( Client* c, WindowOperation op );