diff --git a/kcmkwin/kwinscripts/module.cpp b/kcmkwin/kwinscripts/module.cpp index 9e89cbbde0..8f8e076d4e 100644 --- a/kcmkwin/kwinscripts/module.cpp +++ b/kcmkwin/kwinscripts/module.cpp @@ -21,6 +21,9 @@ #include "ui_module.h" #include +#include +#include +#include #include #include @@ -96,6 +99,7 @@ void Module::updateListViewContents() void Module::defaults() { ui->scriptSelector->defaults(); + emit changed(true); } void Module::load() @@ -109,7 +113,9 @@ void Module::load() void Module::save() { ui->scriptSelector->save(); - // TODO: reload scripts in KWin + m_kwinConfig->sync(); + QDBusMessage message = QDBusMessage::createMethodCall("org.kde.kwin", "/Scripting", "org.kde.kwin.Scripting", "start"); + QDBusConnection::sessionBus().asyncCall(message); emit changed(false); } diff --git a/scripting/scripting.h b/scripting/scripting.h index 8d243d6979..663bbaccc1 100644 --- a/scripting/scripting.h +++ b/scripting/scripting.h @@ -202,7 +202,7 @@ public: public Q_SLOTS: void scriptDestroyed(QObject *object); - void start(); + Q_SCRIPTABLE void start(); private Q_SLOTS: void slotScriptsQueried();