Export a getClient method to Scripting bindings

Finds a Client by windowId.

REVIEW: 105323
icc-effect-5.14.5
Martin Gräßlin 2012-06-22 09:51:27 +02:00
parent 0c6945ba17
commit bc1b769d7f
2 changed files with 11 additions and 0 deletions

View File

@ -215,4 +215,9 @@ void WorkspaceWrapper::hideOutline()
Workspace::self()->outline()->hide();
}
Client *WorkspaceWrapper::getClient(qulonglong windowId)
{
return Workspace::self()->findClient(WindowMatchPredicate(windowId));
}
} // KWin

View File

@ -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