diff --git a/layers.cpp b/layers.cpp index e583c9f414..c676845fef 100644 --- a/layers.cpp +++ b/layers.cpp @@ -662,7 +662,8 @@ void Client::setKeepAbove( bool b ) } keep_above = b; info->setState( keepAbove() ? NET::KeepAbove : 0, NET::KeepAbove ); - // TODO emit a signal about the change to the style plugin + if( decoration != NULL ) + decoration->emitKeepAboveChanged( keepAbove()); workspace()->updateClientLayer( this ); updateWindowRules(); } @@ -681,6 +682,8 @@ void Client::setKeepBelow( bool b ) } keep_below = b; info->setState( keepBelow() ? NET::KeepBelow : 0, NET::KeepBelow ); + if( decoration != NULL ) + decoration->emitKeepBelowChanged( keepBelow()); workspace()->updateClientLayer( this ); updateWindowRules(); } diff --git a/lib/kdecoration.h b/lib/kdecoration.h index b0f157916f..5898940525 100644 --- a/lib/kdecoration.h +++ b/lib/kdecoration.h @@ -577,6 +577,21 @@ class KDecoration * isShade() to get the current state. */ virtual void shadeChange() = 0; +#if KDE_IS_VERSION( 3, 90, 0 ) +#warning Redo all the XYZChange() virtuals as signals. +#endif + signals: + /** + * This signal is emitted whenever the window's keep-above state changes. + * @since 3.3 + */ + void keepAboveChanged( bool ); + /** + * This signal is emitted whenever the window's keep-below state changes. + * @since 3.3 + */ + void keepBelowChanged( bool ); + public: /** * This function may be reimplemented to provide custom bound drawing * for transparent moving or resizing of the window. @@ -748,6 +763,14 @@ class KDecoration * @param set Whether to keep the window below others */ void setKeepBelow( bool set ); + /** + * @internal + */ + void emitKeepAboveChanged( bool above ) { emit keepAboveChanged( above ); } + /** + * @internal + */ + void emitKeepBelowChanged( bool below ) { emit keepBelowChanged( below ); } private: KDecorationBridge* bridge_; QWidget* w_;