From 37f4199b198f52ac4e9e7174e8163caf36e0c429 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 8 Feb 2023 20:01:38 +0200 Subject: [PATCH] scripting: Drop clientArea(area, QPoint, VirtualDesktop) overload Use Workspace.screenAt() to look up the output instead. --- src/qml/outline/plasma/outline.qml | 2 +- src/scripting/workspace_wrapper.cpp | 5 ----- src/scripting/workspace_wrapper.h | 8 -------- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/qml/outline/plasma/outline.qml b/src/qml/outline/plasma/outline.qml index 0d27aa2b8c..ca4fa8230e 100644 --- a/src/qml/outline/plasma/outline.qml +++ b/src/qml/outline/plasma/outline.qml @@ -76,7 +76,7 @@ Window { height: 0 enabledBorders: { - var maximizedArea = Workspace.clientArea(Workspace.MaximizeArea, Qt.point(outline.geometry.x, outline.geometry.y), Workspace.currentDesktop); + var maximizedArea = Workspace.clientArea(Workspace.MaximizeArea, Workspace.screenAt(Qt.point(outline.geometry.x, outline.geometry.y)), Workspace.currentDesktop); var left = outline.geometry.x === maximizedArea.x; var right = outline.geometry.x + outline.geometry.width === maximizedArea.x + maximizedArea.width; diff --git a/src/scripting/workspace_wrapper.cpp b/src/scripting/workspace_wrapper.cpp index e172bd9ac1..74f9f12910 100644 --- a/src/scripting/workspace_wrapper.cpp +++ b/src/scripting/workspace_wrapper.cpp @@ -228,11 +228,6 @@ QSize WorkspaceWrapper::workspaceSize() const return QSize(workspaceWidth(), workspaceHeight()); } -QRectF WorkspaceWrapper::clientArea(ClientAreaOption option, const QPoint &p, VirtualDesktop *desktop) const -{ - return workspace()->clientArea(static_cast(option), workspace()->outputAt(p), desktop); -} - QRectF WorkspaceWrapper::clientArea(ClientAreaOption option, const KWin::Window *c) const { if (!c) { diff --git a/src/scripting/workspace_wrapper.h b/src/scripting/workspace_wrapper.h index a741b8c901..a1f3334b76 100644 --- a/src/scripting/workspace_wrapper.h +++ b/src/scripting/workspace_wrapper.h @@ -210,14 +210,6 @@ public: * @returns The specified screen geometry */ Q_SCRIPTABLE QRectF clientArea(ClientAreaOption option, KWin::Output *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 - */ - Q_SCRIPTABLE QRectF 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