From a35e5cad2842b0be2530154e0bee5b7c3da34211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 22 Jul 2004 11:19:08 +0000 Subject: [PATCH] Inform decoration about keepabove/below changes. CCMAIL: 84841-done@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=331722 --- layers.cpp | 5 ++++- lib/kdecoration.h | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) 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_;