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.
This commit is contained in:
Vlad Zahorodnii 2022-04-08 12:34:51 +03:00 committed by Marco Martin
parent 510a41eeb8
commit 08d18503e3

View file

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