diff --git a/scripting/workspace_wrapper.cpp b/scripting/workspace_wrapper.cpp index 8aef2eb48c..2879cd9b55 100644 --- a/scripting/workspace_wrapper.cpp +++ b/scripting/workspace_wrapper.cpp @@ -215,4 +215,9 @@ void WorkspaceWrapper::hideOutline() Workspace::self()->outline()->hide(); } +Client *WorkspaceWrapper::getClient(qulonglong windowId) +{ + return Workspace::self()->findClient(WindowMatchPredicate(windowId)); +} + } // KWin diff --git a/scripting/workspace_wrapper.h b/scripting/workspace_wrapper.h index a080d7809e..fecfaca712 100644 --- a/scripting/workspace_wrapper.h +++ b/scripting/workspace_wrapper.h @@ -196,6 +196,12 @@ void setter( rettype val ); * Provides support information about the currently running KWin instance. **/ Q_SCRIPTABLE QString supportInformation() const; + /** + * Finds the Client with the given @p windowId. + * @param windowId The window Id of the Client + * @return The found Client or @c null + **/ + Q_SCRIPTABLE KWin::Client *getClient(qulonglong windowId); public Q_SLOTS: // all the available key bindings