diff --git a/effects.cpp b/effects.cpp
index 11104adfe8..ad4695dd7f 100644
--- a/effects.cpp
+++ b/effects.cpp
@@ -25,6 +25,7 @@ along with this program. If not, see .
#include "group.h"
#include "scene_xrender.h"
#include "scene_opengl.h"
+#include "unmanaged.h"
#include "workspace.h"
#include "kwinglutils.h"
@@ -429,6 +430,15 @@ int EffectsHandlerImpl::displayHeight() const
return KWin::displayWidth();
}
+EffectWindow* EffectsHandlerImpl::findWindow( WId id ) const
+ {
+ if( Client* w = Workspace::self()->findClient( WindowMatchPredicate( id )))
+ return w->effectWindow();
+ if( Unmanaged* w = Workspace::self()->findUnmanaged( WindowMatchPredicate( id )))
+ return w->effectWindow();
+ return NULL;
+ }
+
EffectWindowList EffectsHandlerImpl::stackingOrder() const
{
ClientList list = Workspace::self()->stackingOrder();
diff --git a/effects.h b/effects.h
index 2a10f5b5a1..fecded05d7 100644
--- a/effects.h
+++ b/effects.h
@@ -63,6 +63,7 @@ class EffectsHandlerImpl : public EffectsHandler
virtual QPoint cursorPos() const;
virtual bool grabKeyboard( Effect* effect );
virtual void ungrabKeyboard();
+ virtual EffectWindow* findWindow( WId id ) const;
virtual EffectWindowList stackingOrder() const;
virtual void setElevatedWindow( EffectWindow* w, bool set );
diff --git a/lib/kwineffects.h b/lib/kwineffects.h
index 471ff3978e..8bb82ef31f 100644
--- a/lib/kwineffects.h
+++ b/lib/kwineffects.h
@@ -40,7 +40,7 @@ along with this program. If not, see .
#define KWIN_EFFECT_API_MAKE_VERSION( major, minor ) (( major ) << 8 | ( minor ))
#define KWIN_EFFECT_API_VERSION_MAJOR 0
-#define KWIN_EFFECT_API_VERSION_MINOR 4
+#define KWIN_EFFECT_API_VERSION_MINOR 5
#define KWIN_EFFECT_API_VERSION KWIN_EFFECT_API_MAKE_VERSION( \
KWIN_EFFECT_API_VERSION_MAJOR, KWIN_EFFECT_API_VERSION_MINOR )
@@ -381,6 +381,7 @@ class KWIN_EXPORT EffectsHandler
virtual int desktopUp( int desktop, bool wrap ) const = 0;
virtual int desktopDown( int desktop, bool wrap ) const = 0;
+ virtual EffectWindow* findWindow( WId id ) const = 0;
virtual EffectWindowList stackingOrder() const = 0;
// window will be temporarily painted as if being at the top of the stack
virtual void setElevatedWindow( EffectWindow* w, bool set ) = 0;