make transients sticky when their main window becomes sticky

svn path=/trunk/kdebase/kwin/; revision=37996
This commit is contained in:
Matthias Ettrich 2000-01-10 03:47:30 +00:00
parent 39ef01ccbe
commit 8460a9ad3e
3 changed files with 14 additions and 0 deletions

View file

@ -1418,6 +1418,7 @@ void Client::setSticky( bool b )
is_sticky = b;
if ( !is_sticky )
setDesktop( workspace()->currentDesktop() );
workspace()->setStickyTransientsOf( this, b );
stickyChange( is_sticky );
}

View file

@ -810,6 +810,18 @@ void Workspace::iconifyOrDeiconifyTransientsOf( Client* c )
}
/*!
Sets the client \a c's transient windows' sticky property to \a sticky.
*/
void Workspace::setStickyTransientsOf( Client* c, bool sticky )
{
for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) {
if ( (*it)->transientFor() == c->window() && (*it)->isSticky() != sticky )
(*it)->setSticky( sticky );
}
}
/*!
Returns whether a client with the specified \a caption exists, or not.
*/

View file

@ -98,6 +98,7 @@ public:
bool iconifyMeansWithdraw( Client* );
void iconifyOrDeiconifyTransientsOf( Client* );
void setStickyTransientsOf( Client*, bool sticky );
bool hasCaption( const QString& caption );