diff --git a/client.cpp b/client.cpp index 03647989b2..523b78d914 100644 --- a/client.cpp +++ b/client.cpp @@ -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 ); } diff --git a/workspace.cpp b/workspace.cpp index 2b1f08e8ef..3a1cc01ad8 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -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. */ diff --git a/workspace.h b/workspace.h index 4916bf0cde..797311bb80 100644 --- a/workspace.h +++ b/workspace.h @@ -98,6 +98,7 @@ public: bool iconifyMeansWithdraw( Client* ); void iconifyOrDeiconifyTransientsOf( Client* ); + void setStickyTransientsOf( Client*, bool sticky ); bool hasCaption( const QString& caption );