Possible fix for corrupting KWin settings on some systems.

Also fixed setting revert message to only display when actually
reverting.

svn path=/trunk/KDE/kdebase/workspace/; revision=890193
icc-effect-5.14.5
Lucas Murray 2008-11-28 14:57:22 +00:00
parent 09061ebbe9
commit eca9561ab7
2 changed files with 5 additions and 3 deletions

View File

@ -855,6 +855,7 @@ void KWinCompositingConfig::copyPluginsToTmpConfig()
KConfigGroup newGroup( mNewConfig, "Plugins" );
KConfigGroup tmpGroup( mTmpConfig, "Plugins" );
tmpGroup.deleteGroup();
mTmpConfig->sync();
newGroup.copyTo( &tmpGroup );
}
@ -863,6 +864,7 @@ void KWinCompositingConfig::copyPluginsToNewConfig()
KConfigGroup newGroup( mNewConfig, "Plugins" );
KConfigGroup tmpGroup( mTmpConfig, "Plugins" );
newGroup.deleteGroup();
mNewConfig->sync();
tmpGroup.copyTo( &newGroup );
}

View File

@ -51,9 +51,9 @@ Options::Options()
// If there is any contents in the backup file, it means that KWin crashed
// while testing a new config. Revert the config.
// TODO: Notify the user?
bool backupImported = importBackup();
kWarning( 1212, backupImported ) << "The new settings have most likely caused the X server "
"to crash. The configuration options have been reverted to their old values.";
if( importBackup() )
kWarning( 1212 ) << "The new settings have most likely caused the X server "
"to crash. The configuration options have been reverted to their old values.";
updateSettings();
}