diff --git a/kcmkwin/kwincompositing/main.cpp b/kcmkwin/kwincompositing/main.cpp index 2bd2b58d5c..0df802446a 100644 --- a/kcmkwin/kwincompositing/main.cpp +++ b/kcmkwin/kwincompositing/main.cpp @@ -55,6 +55,9 @@ KWinCompositingKCM::KWinCompositingKCM(QWidget* parent, const QVariantList& args setLayout(vl); m_view->setWidth(width()); m_view->setHeight(height()); + connect(m_view.data(), &KWin::Compositing::EffectView::changed, [this]{ + emit changed(true); + }); } KWinCompositingKCM::~KWinCompositingKCM() diff --git a/kcmkwin/kwincompositing/model.cpp b/kcmkwin/kwincompositing/model.cpp index be2f52d61b..2aa757f201 100644 --- a/kcmkwin/kwincompositing/model.cpp +++ b/kcmkwin/kwincompositing/model.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include namespace KWin { @@ -371,6 +372,7 @@ void EffectView::init() setResizeMode(QQuickView::SizeRootObjectToView); rootContext()->setContextProperty("engine", this); setSource(QUrl(mainFile)); + connect(rootObject(), SIGNAL(changed()), this, SIGNAL(changed())); } }//end namespace Compositing diff --git a/kcmkwin/kwincompositing/model.h b/kcmkwin/kwincompositing/model.h index 78426953fe..18ebfeb4c0 100644 --- a/kcmkwin/kwincompositing/model.h +++ b/kcmkwin/kwincompositing/model.h @@ -103,6 +103,8 @@ public: Q_INVOKABLE QColor backgroundViewColor() { return KColorScheme(QPalette::Active, KColorScheme::Window, KSharedConfigPtr(0)).background(KColorScheme::NormalBackground).color(); }; +Q_SIGNALS: + void changed(); };