diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index b8ae069a43..059a8f0d30 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -67,7 +67,10 @@ namespace Oxygen _itemData( this ), _sourceItem( -1 ), _shadowAtom( 0 ) - {} + { + connect(options(), &KDecorationOptions::compositingChanged, this, &Client::updateCompositing); + connect(options(), &KDecorationOptions::configChanged, this, &Client::updateConfig); + } //___________________________________________ Client::~Client() @@ -133,20 +136,24 @@ namespace Oxygen _initialized = true; // first reset is needed to store Oxygen configuration - reset(0); + updateConfig(); } //___________________________________________ - void Client::reset( unsigned long changed ) + void Client::updateCompositing() { // update window mask when compositing is changed if( !_initialized ) return; - if( changed & SettingCompositing ) - { - updateWindowShape(); - widget()->update(); - } + updateWindowShape(); + widget()->update(); + updateConfig(); + } + + //___________________________________________ + void Client::updateConfig() + { + if( !_initialized ) return; _configuration = _factory->configuration( *this ); diff --git a/clients/oxygen/oxygenclient.h b/clients/oxygen/oxygenclient.h index 11bdd1152d..dfa1dfcadc 100644 --- a/clients/oxygen/oxygenclient.h +++ b/clients/oxygen/oxygenclient.h @@ -127,9 +127,6 @@ namespace Oxygen //! initialization virtual void init(); - // reset - virtual void reset( unsigned long changed ); - //! return associated configuration Factory::ConfigurationPtr configuration( void ) const { return _configuration; } @@ -435,6 +432,10 @@ namespace Oxygen //! bound one rect to another void boundRectTo( QRect&, const QRect& ) const; + private Q_SLOTS: + void updateCompositing(); + void updateConfig(); + private: //! factory