diff --git a/src/scripting/workspace_wrapper.cpp b/src/scripting/workspace_wrapper.cpp index 77be65b12b..6c58982c89 100644 --- a/src/scripting/workspace_wrapper.cpp +++ b/src/scripting/workspace_wrapper.cpp @@ -270,6 +270,11 @@ QRect WorkspaceWrapper::clientArea(ClientAreaOption option, const QPoint &p, int return Workspace::self()->clientArea(static_cast(option), output, virtualDesktop); } +QRect WorkspaceWrapper::clientArea(ClientAreaOption option, const QPoint &p, VirtualDesktop *desktop) const +{ + return workspace()->clientArea(static_cast(option), kwinApp()->platform()->outputAt(p), desktop); +} + QRect WorkspaceWrapper::clientArea(ClientAreaOption option, const KWin::AbstractClient *c) const { return Workspace::self()->clientArea(static_cast(option), c); @@ -302,6 +307,11 @@ QRect WorkspaceWrapper::clientArea(ClientAreaOption option, int screen, int desk return workspace()->clientArea(static_cast(option), output, virtualDesktop); } +QRect WorkspaceWrapper::clientArea(ClientAreaOption option, AbstractOutput *output, VirtualDesktop *desktop) const +{ + return workspace()->clientArea(static_cast(option), output, desktop); +} + QString WorkspaceWrapper::desktopName(int desktop) const { const VirtualDesktop *vd = VirtualDesktopManager::self()->desktopForX11Id(desktop); diff --git a/src/scripting/workspace_wrapper.h b/src/scripting/workspace_wrapper.h index 515b4b188c..b2e7dcfdfc 100644 --- a/src/scripting/workspace_wrapper.h +++ b/src/scripting/workspace_wrapper.h @@ -22,6 +22,7 @@ namespace KWin { // forward declarations class AbstractClient; +class AbstractOutput; class VirtualDesktop; class X11Client; @@ -241,16 +242,20 @@ public: * @param screen The screen for which the area should be considered * @param desktop The desktop for which the area should be considered, in general there should not be a difference * @returns The specified screen geometry + * @deprecated use clientArea(ClientAreaOption option, KWin::AbstractOutput *output, KWin::VirtualDesktop *desktop) */ - Q_SCRIPTABLE QRect clientArea(ClientAreaOption option, int screen, int desktop) const; + Q_SCRIPTABLE QRect clientArea(ClientAreaOption option, int screen, int desktop) const; // TODO Plasma 6: Drop + Q_SCRIPTABLE QRect clientArea(ClientAreaOption option, KWin::AbstractOutput *output, KWin::VirtualDesktop *desktop) const; /** * Overloaded method for convenience. * @param option The type of area which should be considered * @param point The coordinates which have to be included in the area * @param desktop The desktop for which the area should be considered, in general there should not be a difference * @returns The specified screen geometry + * @deprecated use clientArea(ClientAreaOption option, const QPoint &point, KWin::VirtualDesktop *desktop) */ - Q_SCRIPTABLE QRect clientArea(ClientAreaOption option, const QPoint &point, int desktop) const; + Q_SCRIPTABLE QRect clientArea(ClientAreaOption option, const QPoint &point, int desktop) const; // TODO Plasma 6: Drop + Q_SCRIPTABLE QRect clientArea(ClientAreaOption option, const QPoint &point, KWin::VirtualDesktop *desktop) const; /** * Overloaded method for convenience. * @param client The Client for which the area should be retrieved