From 08d18503e3a4ce67cc40c6a9aaf4d08d1a57dd35 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 8 Apr 2022 12:34:51 +0300 Subject: [PATCH] Use output property in Workspace::clientArea() Since the Toplevel.output property is properly synchronized with the frame geometry, Workspace::clientArea() can use the output property instead of looking up the screen. It makes code intuitive and removes unnecessary lookups. --- src/workspace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workspace.cpp b/src/workspace.cpp index 0f605fd656..67215085e4 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -2324,7 +2324,7 @@ QRect Workspace::clientArea(clientAreaOption opt, const AbstractOutput *output, QRect Workspace::clientArea(clientAreaOption opt, const Toplevel *window) const { - return clientArea(opt, window, window->frameGeometry().center()); + return clientArea(opt, window, window->output()); } QRect Workspace::clientArea(clientAreaOption opt, const Toplevel *window, const AbstractOutput *output) const