Remove reset method from OxygenClient
Connects to the appropriate changed signals instead.
This commit is contained in:
parent
d10a31750e
commit
287ddf8446
2 changed files with 19 additions and 11 deletions
|
@ -67,7 +67,10 @@ namespace Oxygen
|
||||||
_itemData( this ),
|
_itemData( this ),
|
||||||
_sourceItem( -1 ),
|
_sourceItem( -1 ),
|
||||||
_shadowAtom( 0 )
|
_shadowAtom( 0 )
|
||||||
{}
|
{
|
||||||
|
connect(options(), &KDecorationOptions::compositingChanged, this, &Client::updateCompositing);
|
||||||
|
connect(options(), &KDecorationOptions::configChanged, this, &Client::updateConfig);
|
||||||
|
}
|
||||||
|
|
||||||
//___________________________________________
|
//___________________________________________
|
||||||
Client::~Client()
|
Client::~Client()
|
||||||
|
@ -133,20 +136,24 @@ namespace Oxygen
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
|
|
||||||
// first reset is needed to store Oxygen configuration
|
// 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
|
// update window mask when compositing is changed
|
||||||
if( !_initialized ) return;
|
if( !_initialized ) return;
|
||||||
if( changed & SettingCompositing )
|
updateWindowShape();
|
||||||
{
|
widget()->update();
|
||||||
updateWindowShape();
|
updateConfig();
|
||||||
widget()->update();
|
}
|
||||||
}
|
|
||||||
|
//___________________________________________
|
||||||
|
void Client::updateConfig()
|
||||||
|
{
|
||||||
|
if( !_initialized ) return;
|
||||||
|
|
||||||
_configuration = _factory->configuration( *this );
|
_configuration = _factory->configuration( *this );
|
||||||
|
|
||||||
|
|
|
@ -127,9 +127,6 @@ namespace Oxygen
|
||||||
//! initialization
|
//! initialization
|
||||||
virtual void init();
|
virtual void init();
|
||||||
|
|
||||||
// reset
|
|
||||||
virtual void reset( unsigned long changed );
|
|
||||||
|
|
||||||
//! return associated configuration
|
//! return associated configuration
|
||||||
Factory::ConfigurationPtr configuration( void ) const
|
Factory::ConfigurationPtr configuration( void ) const
|
||||||
{ return _configuration; }
|
{ return _configuration; }
|
||||||
|
@ -435,6 +432,10 @@ namespace Oxygen
|
||||||
//! bound one rect to another
|
//! bound one rect to another
|
||||||
void boundRectTo( QRect&, const QRect& ) const;
|
void boundRectTo( QRect&, const QRect& ) const;
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void updateCompositing();
|
||||||
|
void updateConfig();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
//! factory
|
//! factory
|
||||||
|
|
Loading…
Reference in a new issue