Reload decorations when any shadow-related settings are changed.
svn path=/trunk/KDE/kdebase/workspace/; revision=888747
This commit is contained in:
parent
1a97abea6d
commit
7c0628f337
2 changed files with 18 additions and 0 deletions
|
@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <kcolorscheme.h>
|
||||
|
||||
#include <QtDBus/QtDBus>
|
||||
#include <QVBoxLayout>
|
||||
#include <QColor>
|
||||
#ifndef KDE_USE_FINAL
|
||||
|
@ -116,6 +117,10 @@ void ShadowEffectConfig::save()
|
|||
|
||||
emit changed(false);
|
||||
EffectsHandler::sendReloadMessage( "shadow" );
|
||||
|
||||
// We also need to reload decorations
|
||||
QDBusMessage message = QDBusMessage::createMethodCall( "org.kde.kwin", "/KWin", "org.kde.KWin", "reconfigure" );
|
||||
QDBusConnection::sessionBus().send( message );
|
||||
}
|
||||
|
||||
void ShadowEffectConfig::defaults()
|
||||
|
|
|
@ -791,6 +791,19 @@ 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" );
|
||||
bool shadowBefore = effectEnabled( "shadow", effectConfig );
|
||||
effectConfig = KConfigGroup( mNewConfig, "Plugins" );
|
||||
bool shadowAfter = effectEnabled( "shadow", effectConfig );
|
||||
if( 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