diff --git a/scripting/scriptedeffect.cpp b/scripting/scriptedeffect.cpp index 2d71866a1f..a63b3cf56b 100644 --- a/scripting/scriptedeffect.cpp +++ b/scripting/scriptedeffect.cpp @@ -694,6 +694,11 @@ void ScriptedEffect::animationEnded(KWin::EffectWindow *w, Attribute a, uint met emit animationEnded(w, 0); } +QString ScriptedEffect::pluginId() const +{ + return m_effectName; +} + bool ScriptedEffect::isActiveFullScreenEffect() const { return effects->activeFullScreenEffect() == this; diff --git a/scripting/scriptedeffect.h b/scripting/scriptedeffect.h index 26a2393953..d6cbb65049 100644 --- a/scripting/scriptedeffect.h +++ b/scripting/scriptedeffect.h @@ -28,6 +28,10 @@ class KWIN_EXPORT ScriptedEffect : public KWin::AnimationEffect Q_ENUMS(MetaType) Q_ENUMS(EasingCurve) Q_ENUMS(SessionState) + /** + * The plugin ID of the effect + */ + Q_PROPERTY(QString pluginId READ pluginId CONSTANT) /** * True if we are the active fullscreen effect */ @@ -108,6 +112,8 @@ public: return m_screenEdgeCallbacks; } + QString pluginId() const; + bool isActiveFullScreenEffect() const; bool registerTouchScreenCallback(int edge, QScriptValue callback);