Reload decorations when enabling or disabling compositing as well.
svn path=/trunk/KDE/kdebase/workspace/; revision=890055
This commit is contained in:
parent
5f8081a7e9
commit
141dae20ed
1 changed files with 14 additions and 2 deletions
|
@ -791,19 +791,31 @@ bool KWinCompositingConfig::sendKWinReloadSignal()
|
|||
QDBusMessage message = QDBusMessage::createSignal( "/KWin", "org.kde.KWin", "reloadCompositingConfig" );
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
|
||||
//-------------
|
||||
// If we added or removed shadows we need to reload decorations as well
|
||||
// We have to do this separately so the settings are in sync
|
||||
// HACK: This should really just reload decorations, not do a full reconfigure
|
||||
KConfigGroup effectConfig( mBackupConfig, "Plugins" );
|
||||
|
||||
KConfigGroup effectConfig;
|
||||
|
||||
effectConfig = KConfigGroup( mBackupConfig, "Compositing" );
|
||||
bool enabledBefore = effectConfig.readEntry( "Enabled", mDefaultPrefs.enableCompositing() );
|
||||
effectConfig = KConfigGroup( mNewConfig, "Compositing" );
|
||||
bool enabledAfter = effectConfig.readEntry( "Enabled", mDefaultPrefs.enableCompositing() );
|
||||
|
||||
effectConfig = KConfigGroup( mBackupConfig, "Plugins" );
|
||||
bool shadowBefore = effectEnabled( "shadow", effectConfig );
|
||||
effectConfig = KConfigGroup( mNewConfig, "Plugins" );
|
||||
bool shadowAfter = effectEnabled( "shadow", effectConfig );
|
||||
if( shadowBefore != shadowAfter )
|
||||
|
||||
if( enabledBefore != enabledAfter || shadowBefore != shadowAfter )
|
||||
{
|
||||
message = QDBusMessage::createMethodCall( "org.kde.kwin", "/KWin", "org.kde.KWin", "reconfigure" );
|
||||
QDBusConnection::sessionBus().send( message );
|
||||
}
|
||||
|
||||
//-------------
|
||||
|
||||
// If compositing is enabled, check if it could be started.
|
||||
KConfigGroup newGroup( mNewConfig, "Compositing" );
|
||||
bool enabled = newGroup.readEntry( "Enabled", mDefaultPrefs.enableCompositing() );
|
||||
|
|
Loading…
Reference in a new issue